aboutsummaryrefslogtreecommitdiff
path: root/lib/libmagic
Commit message (Collapse)AuthorAgeFilesLines
* libmagic: Add swap.c and magic.h to SRCS.Xin LI2026-09-051-2/+4
| | | | | | | | | | | | | | file 5.48 added swap.c and swap.h for byte-swapping operations, which are required on hosts that lack <byteswap.h> or <sys/bswap.h> (e.g. macOS cross-building or older FreeBSD bootstrap environments). Also add magic.h to SRCS so object files depend on the generated header before compiling, avoiding falling back to the host's /usr/include/magic.h during parallel builds. Reported by: wosch MFC after: 1 week Fixes: 7af41682a96b ("MFV: file 5.48")
* MFV: file 5.48Xin LI2026-09-031-3/+9
| | | | MFC after: 1 week
* MFV: file 5.47.Xin LI2026-06-031-3/+3
| | | | MFC after: 3 days
* packages: Install development manpages in the -dev packageLexi Winter2025-10-261-3/+5
| | | | | | | | | | | | | | | | | | | | | Add a new per-group SUBPACKAGE option to bsd.man.mk. When MANSPLITPKG is enabled, this is forced to "-man", otherwise it defaults to empty but can be overridden by the caller. Use this in bsd.lib.mk to install library manpages in the -dev package instead of the base package. This is nearly always preferable, since library manpages are usually in section 2 or 3 and are only relevant to people with development packages installed. For manpages which should be installed in the base package even for libraries, add a new MANNODEV group in bsd.lib.mk. Update existing Makefiles to use this where appropriate. MFC after: 3 days Discussed with: olce Reviewed by: olce Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52832
* libmagic: Unbreak for older FreeBSD releases.Xin LI2025-01-081-0/+5
| | | | | | | | | | byteswap.h is introduced in FreeBSD 13.2 but was not available in earlier versions. In order to support upgrading from an earlier FreeBSD release we would need to tell the build system that fact. PR: bin/273736 Reported by: philip MFC after: 3 days
* MFV: file 5.46.Xin LI2024-12-081-63/+84
| | | | MFC after: 2 weeks
* Update Makefile.depend filesSimon J. Gerraty2024-10-141-0/+1
| | | | | | | After building packages we have a number of new and updated Makefile.depend files Reviewed by: stevek
* libmagic: Use HOST_CC when compiling hostprog used by buildStephen J. Kiernan2024-03-271-2/+3
| | | | | | | | | | The "mkmagic" program should be built with the host compiler. Only use BTOOLSPATH if not building for host Obtained from: Juniper Networks, Inc. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D44539
* Disable byteswap.h for now.Xin LI2023-09-121-1/+1
| | | | | | | Ideally we should be testing __FreeBSD_version (1400079) and/or BOOTSTRAPPING from an older version, but restore compatibility to older FreeBSD versions and macOS while we find out a better way to fix it.
* MFV: file 5.45.Xin LI2023-09-102-4/+26
| | | | MFC after: 3 days
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* file: upgrade to 5.43.Xin LI2022-09-251-26/+82
| | | | MFC after: 3 days
* Install working pkgconfig .pc files for compat librariesAlex Richardson2022-08-111-3/+3
| | | | | | | | | The default ones are install them to /usr/libdata/pkgconfig, and we can't use this path for compat libraries, so we use /usr/lib<suffix>/pkgconfigi here. Test Plan: grep -rn libdir= ./usr/lib32/pkgconfig/*.pc MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D34939
* file: upgrade to 5.42.Xin LI2022-07-041-3/+18
| | | | MFC after: 2 weeks
* file: Fix cross-compilation on Darwin/macOSJose Luis Duran2022-01-071-0/+2
| | | | | | | | | Darwin/macOS does not have pipe2(2). Apply a similar guard as in f3d7ace4b235422e5ccff0315f2965ac935241d8 after 43a5ec4eb41567cc92586503212743d89686d78f. Pull Request: https://github.com/freebsd/freebsd-src/pull/574
* file: Turns out we need xlocal.h protectionWarner Losh2022-01-041-0/+2
| | | | | | | | | | | | | | It turns out that we still need xlocal.h protection for when we're cross building on Linux. Linux doesn't have this file, but os/x does. Before, we'd assume we didn't have it, like old FreeBSD, when cross compiling. After the latest update, all that code was removed so cross compiling needs to be handled separaetly. Do so by defining HAVE_XLOCALE_H only when we're not building on linux. This allows us to build the mkmagic build tool needed to build file(1). Sponsored by: Netflix Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D33741
* file: upgrade to 5.41.Xin LI2022-01-041-3/+6
| | | | MFC after: 2 weeks
* libmagic: Remove support for older FreeBSD where xlocale was not available.Xin LI2022-01-031-18/+18
| | | | | | | | | | The MINIMUM_SUPPORTED_OSREL is 1002501 (FreeBSD 10.3), and xlocale is supported there. While I'm there, explicitly use config.h generated with --disable-bzlib --disable-xzlib instead of deleting them manually. MFC after: 2 weeks
* Convert libs with pc files to use PCFILESEmmanuel Vadot2021-03-161-2/+1
| | | | | | | | Now the .pc ends up in the correct package (-dev) Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D29172 MFC after: 2 weeks
* Fix installation of magic file.Xin LI2020-06-171-2/+2
| | | | | | | | | Reported by: lwhsu MFC after: 2 weeks X-MFC-with: r362258 Notes: svn path=/head/; revision=362279
* MFV r362254: file 5.39.Xin LI2020-06-172-3/+20
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=362258
* MFV r357712: file 5.38.Xin LI2020-02-112-8/+5
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=357757
* Tweaks for DIRDEPS_BUILDSimon J. Gerraty2019-12-191-1/+3
| | | | | | | | | | | | | | libmagic only depend on mkmagic if not DIRDEPS_BUILD libpmc fix -I for libpmcstat local.dirdeps.mk be even more careful about adding gnu/lib/csu to DIRDEPS Reviewed by: bdrewery Differential Revision: https://reviews.freebsd.org/D22872 Notes: svn path=/head/; revision=355904
* Update dirdeps.mk and gendirdeps.mkSimon J. Gerraty2019-12-111-0/+6
| | | | | | | | | | | | | | | | | | | The env space consumed by exporting all libc's .meta files left little room for command line, so unexport when done. Update dirdeps.mk to latest and add dirdeps-targets.mk to simplify/update targets/Makefile Makefile changes to go with Makefile.depend changes in D22494 Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22495 Notes: svn path=/head/; revision=355618
* Update Makefile.depend filesSimon J. Gerraty2019-12-112-1/+7
| | | | | | | | | | | | | Update a bunch of Makefile.depend files as a result of adding Makefile.depend.options files Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22494 Notes: svn path=/head/; revision=355617
* MFV r354582: file 5.37.Xin LI2019-11-102-25/+13
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=354595
* Fix .depend files to work for build tools.Bryan Drewery2019-06-151-2/+3
| | | | | | | | | | This is somewhat of a follow-up to r335746. MFC after: 2 weeks Sponsored by: DellEMC Notes: svn path=/head/; revision=349062
* Don't use CCACHE for linking.Bryan Drewery2018-06-271-1/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: Dell EMC Notes: svn path=/head/; revision=335733
* Style fixup:Cy Schubert2018-05-201-2/+2
| | | | | | | | A non-functional commit to make adjustment to an aesthetically unpleasing long line. Notes: svn path=/head/; revision=333923
* Fix build post r333919.Cy Schubert2018-05-201-2/+2
| | | | | | | | This commit results in an aesthetically unpleasing long line which will be fixed next commit. Notes: svn path=/head/; revision=333922
* LIB32: Avoid linking in unneeded (and invalid lib32) libz for libmagic build ↵Bryan Drewery2018-03-091-0/+2
| | | | | | | | | | | | | | | | | | | | tool. Usually this is just ignored: /usr/bin/ld: skipping incompatible /scratch/obj/root/git/freebsd/amd64.amd64/obj-lib32/lib/libz/libz.so when searching for -lz /usr/bin/ld: skipping incompatible /scratch/obj/root/git/freebsd/amd64.amd64/obj-lib32/lib/libz/libz.a when searching for -lz However some combination of newer toolchains simply fail here instead: /usr/bin/ld: error: /home/dstolfa/obj/home/dstolfa/cadets/amd64.amd64/obj-lib32/lib/libz/libz.so is incompatible with /usr/lib/crt1.o Libz is not needed for mkmagic so just exclude it. Reported by: Domagoj Stolfa <domagoj.stolfa@gmail.com> MFC after: 2 weeks Sponsored by: Dell EMC Notes: svn path=/head/; revision=330702
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* MFV r323678: file 5.32Gordon Tetlow2017-09-171-3/+3
| | | | | | | | | Approved by: emaste (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12400 Notes: svn path=/head/; revision=323683
* Use SRCTOP-relative paths to other directories instead of .CURDIR-relative onesEnji Cooper2017-01-201-1/+1
| | | | | | | | | | This simplifies pathing in make/displayed output MFC after: 3 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=312497
* MFV r308392: file 5.29.Xin LI2016-11-071-3/+3
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=308420
* Fix build: explicitly reference the generated magic.h as dependencyXin LI2016-06-271-3/+3
| | | | | | | | | | | | | of mkmagic and point its location. Reported by: jenkins Pointy hat to: delphij MFC after: 2 weeks X-MFC-With: 302221 Approved by: re (kib) Notes: svn path=/head/; revision=302222
* MFV r302218: file 5.28.Xin LI2016-06-272-3/+12
| | | | | | | | | Relnotes: yes MFC after: 2 weeks Approved by: re (gjb) Notes: svn path=/head/; revision=302221
* MFV r299716: file 5.27Xin LI2016-05-141-3/+3
| | | | | | | | MFC after: 2 weeks Relnotes: yes Notes: svn path=/head/; revision=299736
* DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools.Bryan Drewery2016-05-091-1/+1
| | | | | | | | | This avoids running target binaries. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299289
* MFV r298178:Xin LI2016-04-182-4/+7
| | | | | | | | | | Update file to 5.26. MFC after: 2 weeks Relnotes: yes Notes: svn path=/head/; revision=298192
* MFHGlen Barber2016-04-161-1/+1
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=298092
| * META_MODE: Don't rebuild build-tools targets during normal build.Bryan Drewery2016-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This avoids 'build command changed' due to CFLAGS/CC changes during the normal build. Without this the build-tools targets end up rebuilding for the *target* rather than keeping the native versions built in build-tools. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=297997
* | First pass through library packaging.Glen Barber2016-02-041-0/+1
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295278
* META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.Bryan Drewery2015-11-251-1/+0
| | | | | | | | | | | This both avoids some dependencies on xinstall.host and allows bootstrapping on older releases to work due to lack of at least 'install -l' support. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291307
* MFV r288140: update file to 5.25.Xin LI2015-09-231-3/+3
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=288143
* MFV r287451 + 287452: file 5.24 + fix for bin/181436.Xin LI2015-09-041-3/+3
| | | | | | | | PR: 181436 MFC after: 2 weeks Notes: svn path=/head/; revision=287453
* new dependsSimon J. Gerraty2015-06-161-1/+0
| | | | Notes: svn path=/head/; revision=284481
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-5/+35
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=283595