diff options
author | Yuichiro NAITO <[email protected]> | 2017-12-25 16:13:30 +0900 |
---|---|---|
committer | Bradley Sepos <[email protected]> | 2018-01-13 00:03:39 -0500 |
commit | 560decf6c790ca1d543a216ed859d3ff6bb5f542 (patch) | |
tree | 6cbf718e79a8527e0351872982e8b05ace9e57cf /make | |
parent | c47b8f5ab8a049eda618462802ecce72bc4f6a57 (diff) |
build: Add FreeBSD support.
Closes #1076.
Diffstat (limited to 'make')
-rw-r--r-- | make/configure.py | 20 | ||||
-rw-r--r-- | make/include/main.defs | 5 | ||||
-rw-r--r-- | make/variant/freebsd.defs | 2 |
3 files changed, 22 insertions, 5 deletions
diff --git a/make/configure.py b/make/configure.py index 0fa7e9a3b..6dd049adb 100644 --- a/make/configure.py +++ b/make/configure.py @@ -581,6 +581,9 @@ class ArchAction( Action ): pass elif host.match( '*-*-solaris*' ): pass + elif host.match( '*-*-freebsd.*' ): + self.mode['i386'] = 'i386-portsbuild-freebsd%s' % (host.release) + self.mode['amd64'] = 'amd64-portsbuild-freebsd%s' % (host.release) else: self.msg_pass = 'WARNING' @@ -1284,16 +1287,18 @@ def createCLI(): h = IfHost( 'enable assembly code in non-contrib modules', 'NOMATCH*-*-darwin*', 'NOMATCH*-*-linux*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--enable-asm', default=False, action='store_true', help=h ) - h = IfHost( 'disable GTK GUI', '*-*-linux*', none=optparse.SUPPRESS_HELP ).value + h = IfHost( 'disable GTK GUI', '*-*-linux*', '*-*-freebsd*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--disable-gtk', default=False, action='store_true', help=h ) - h = IfHost( 'disable GTK GUI update checks', '*-*-linux*', none=optparse.SUPPRESS_HELP ).value + h = IfHost( 'disable GTK GUI update checks', '*-*-linux*', '*-*-freebsd*', none=optparse.SUPPRESS_HELP ).value + grp.add_option( '--disable-gtk-update-checks', default=False, action='store_true', help=h ) h = IfHost( 'enable GTK GUI (mingw)', '*-*-mingw*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--enable-gtk-mingw', default=False, action='store_true', help=h ) - h = IfHost( 'disable GStreamer (live preview)', '*-*-linux*', none=optparse.SUPPRESS_HELP ).value + h = IfHost( 'disable GStreamer (live preview)', '*-*-linux*', '*-*-freebsd*', none=optparse.SUPPRESS_HELP ).value + grp.add_option( '--disable-gst', default=False, action='store_true', help=h ) h = IfHost( 'enable Intel Quick Sync Video (QSV) hardware acceleration', '*-*-*', none=optparse.SUPPRESS_HELP ).value @@ -1345,7 +1350,7 @@ def createCLI(): h = IfHost( 'Build and use local pkg-config', '*-*-darwin*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--enable-local-pkgconfig', default=False, action='store_true', help=h ) - h = IfHost( 'Build extra contribs for flatpak packaging', '*-*-linux*', none=optparse.SUPPRESS_HELP ).value + h = IfHost( 'Build extra contribs for flatpak packaging', '*-*-linux*', '*-*-freebsd*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--flatpak', default=False, action='store_true', help=h ) cli.add_option_group( grp ) @@ -1894,8 +1899,11 @@ int main() doc.add( 'HAS.regex', 1 ) if strtok_r.fail: doc.add( 'COMPAT.strtok_r', 1 ) + else: doc.addBlank() + if build.system == 'freebsd': + doc.add( 'HAS.pthread', 1 ) if not strerror_r.fail: doc.add( 'HAS.strerror_r', 1 ) @@ -1929,6 +1937,8 @@ int main() doc.add( 'LIBHB.GCC.D', 'ARCH_X86_32', append=True ) elif build.match( 'x86_64-*' ): doc.add( 'LIBHB.GCC.D', 'ARCH_X86_64', append=True ) + elif build.match( 'amd64-*' ): + doc.add( 'LIBHB.GCC.D', 'ARCH_X86_64', append=True ) if options.enable_asm and ( not Tools.yasm.fail or options.enable_local_yasm ): asm = '' @@ -1941,7 +1951,7 @@ int main() else: doc.add( 'LIBHB.YASM.f', 'elf32' ) doc.add( 'LIBHB.YASM.m', 'x86' ) - elif build.match( 'x86_64-*' ): + elif build.match( 'x86_64-*' ) or build.match( 'amd64-*' ): asm = 'x86' doc.add( 'LIBHB.GCC.D', 'HAVE_MMX ARCH_X86_64', append=True ) if build.match( '*-*-darwin*' ): diff --git a/make/include/main.defs b/make/include/main.defs index b724b6078..8a0b39dbc 100644 --- a/make/include/main.defs +++ b/make/include/main.defs @@ -136,6 +136,11 @@ ifeq (1-linux,$(FEATURE.gtk)-$(BUILD.system)) MODULES += gtk endif +ifeq (1-freebsd,$(FEATURE.gtk)-$(BUILD.system)) + ## build gtk when gtk+freebsd + MODULES += gtk +endif + ifeq (1-kfreebsd,$(FEATURE.gtk)-$(BUILD.system)) ## build gtk when gtk+kfreebsd MODULES += gtk diff --git a/make/variant/freebsd.defs b/make/variant/freebsd.defs index 251debcf4..f575c8bed 100644 --- a/make/variant/freebsd.defs +++ b/make/variant/freebsd.defs @@ -1,5 +1,7 @@ TARGET.dylib.ext = .so +GCC.D = LIBICONV_PLUG + GCC.args.dylib = -shared GCC.args.pic = 1 |