Skip to content

Commit 7b06ffc

Browse files
committed
build: add NetBSD support to depends
1 parent 3ce40e6 commit 7b06ffc

File tree

7 files changed

+39
-0
lines changed

7 files changed

+39
-0
lines changed

depends/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ full_build_os:=$(subst $(build_arch)-$(build_vendor)-,,$(build))
7777
build_os:=$(findstring linux,$(full_build_os))
7878
build_os+=$(findstring darwin,$(full_build_os))
7979
build_os+=$(findstring freebsd,$(full_build_os))
80+
build_os+=$(findstring netbsd,$(full_build_os))
8081
build_os+=$(findstring openbsd,$(full_build_os))
8182
build_os:=$(strip $(build_os))
8283
ifeq ($(build_os),)
@@ -89,6 +90,7 @@ full_host_os:=$(subst $(host_arch)-$(host_vendor)-,,$(canonical_host))
8990
host_os:=$(findstring linux,$(full_host_os))
9091
host_os+=$(findstring darwin,$(full_host_os))
9192
host_os+=$(findstring freebsd,$(full_host_os))
93+
host_os+=$(findstring netbsd,$(full_host_os))
9294
host_os+=$(findstring openbsd,$(full_host_os))
9395
host_os+=$(findstring mingw32,$(full_host_os))
9496

depends/builders/netbsd.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build_netbsd_SHA256SUM = shasum -a 256
2+
build_netbsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o

depends/hosts/netbsd.mk

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
netbsd_CFLAGS=-pipe
2+
netbsd_CXXFLAGS=$(netbsd_CFLAGS)
3+
4+
netbsd_release_CFLAGS=-O2
5+
netbsd_release_CXXFLAGS=$(netbsd_release_CFLAGS)
6+
7+
netbsd_debug_CFLAGS=-O1
8+
netbsd_debug_CXXFLAGS=$(netbsd_debug_CFLAGS)
9+
10+
ifeq (86,$(findstring 86,$(build_arch)))
11+
i686_netbsd_CC=gcc -m32
12+
i686_netbsd_CXX=g++ -m32
13+
i686_netbsd_AR=ar
14+
i686_netbsd_RANLIB=ranlib
15+
i686_netbsd_NM=nm
16+
i686_netbsd_STRIP=strip
17+
18+
x86_64_netbsd_CC=gcc -m64
19+
x86_64_netbsd_CXX=g++ -m64
20+
x86_64_netbsd_AR=ar
21+
x86_64_netbsd_RANLIB=ranlib
22+
x86_64_netbsd_NM=nm
23+
x86_64_netbsd_STRIP=strip
24+
else
25+
i686_netbsd_CC=$(default_host_CC) -m32
26+
i686_netbsd_CXX=$(default_host_CXX) -m32
27+
x86_64_netbsd_CC=$(default_host_CC) -m64
28+
x86_64_netbsd_CXX=$(default_host_CXX) -m64
29+
endif
30+
31+
netbsd_cmake_system=NetBSD

depends/packages/bdb.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ $(package)_config_opts=--disable-shared --enable-cxx --disable-replication --ena
1111
$(package)_config_opts_mingw32=--enable-mingw
1212
$(package)_config_opts_linux=--with-pic
1313
$(package)_config_opts_freebsd=--with-pic
14+
$(package)_config_opts_netbsd=--with-pic
1415
$(package)_config_opts_openbsd=--with-pic
1516
$(package)_config_opts_android=--with-pic
1617
$(package)_cflags+=-Wno-error=implicit-function-declaration

depends/packages/libevent.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ define $(package)_set_vars
1313
$(package)_config_opts_release=--disable-debug-mode
1414
$(package)_config_opts_linux=--with-pic
1515
$(package)_config_opts_freebsd=--with-pic
16+
$(package)_config_opts_netbsd=--with-pic
1617
$(package)_config_opts_openbsd=--with-pic
1718
$(package)_config_opts_android=--with-pic
1819
$(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601

depends/packages/sqlite.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ define $(package)_set_vars
88
$(package)_config_opts=--disable-shared --disable-readline --disable-dynamic-extensions --enable-option-checking
99
$(package)_config_opts_linux=--with-pic
1010
$(package)_config_opts_freebsd=--with-pic
11+
$(package)_config_opts_netbsd=--with-pic
1112
$(package)_config_opts_openbsd=--with-pic
1213
endef
1314

depends/packages/zeromq.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ define $(package)_set_vars
1313
$(package)_config_opts += --disable-Werror --disable-drafts --enable-option-checking
1414
$(package)_config_opts_linux=--with-pic
1515
$(package)_config_opts_freebsd=--with-pic
16+
$(package)_config_opts_netbsd=--with-pic
1617
$(package)_config_opts_openbsd=--with-pic
1718
$(package)_config_opts_android=--with-pic
1819
$(package)_cxxflags+=-std=c++17

0 commit comments

Comments
 (0)