Ravenports generated: 07 Apr 2023 04:58
[ravenports.git] / bucket_6C / firebird25
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               firebird25
4 VERSION=                2.5.9
5 REVISION=               1
6 KEYWORDS=               databases
7 VARIANTS=               standard
8 SDESC[standard]=        Firebird-2 relational SQL database
9 HOMEPAGE=               https://www.firebirdsql.org/
10 CONTACT=                nobody
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/
14 DISTFILE[1]=            Firebird-2.5.9.27139-0.tar.bz2:main
15 DF_INDEX=               1
16 SPKGS[standard]=        complete
17                         server
18                         client
19                         docs
20                         dev
21
22 OPTIONS_AVAILABLE=      none
23 OPTIONS_STANDARD=       none
24
25 BROKEN[sunos]=          gpre segfaults on dpm.cpp during at end of build
26 NOT_FOR_OPSYS=          netbsd
27 NOT_FOR_ARCH=           aarch64
28
29 BUILDRUN_DEPENDS=       libedit:single:standard
30 EXRUN[server]=          firebird25:client:standard
31
32 USERS=                  firebird
33 GROUPS=                 firebird
34 USERGROUP_SPKG=         server
35
36 USES=                   cpe gmake ncurses pkgconfig c++:server,client
37
38 DISTNAME=               Firebird-2.5.9.27139-0
39
40 LICENSE=                CUSTOM1:server CUSTOM2:server
41 LICENSE_TERMS=          server:{{WRKSRC}}/doc/license/README.license.usage.txt
42 LICENSE_NAME=           CUSTOM1:"Initial Developer's Public License"
43                         CUSTOM2:"InterBase Public License"
44 LICENSE_FILE=           CUSTOM1:{{WRKSRC}}/builds/install/misc/IDPLicense.txt
45                         CUSTOM2:{{WRKSRC}}/builds/install/misc/IPLicense.txt
46 LICENSE_SCHEME=         multi
47
48 CPE_PRODUCT=            firebird
49 CPE_VENDOR=             firebirdsql
50 FPC_EQUIVALENT=         databases/firebird25-server
51
52 MUST_CONFIGURE=         gnu
53 CONFIGURE_ARGS=         --prefix=/var/db/firebird
54                         --exec-prefix={{PREFIX}}
55                         --with-fbconf={{PREFIX}}/etc/firebird
56                         --with-fbglock=/var/db/firebird
57                         --with-fbhelp=/var/db/firebird/help
58                         --with-fbintl={{PREFIX}}/libexec/firebird/intl
59                         --with-fblog=/var/db/firebird
60                         --with-fbmsg={{PREFIX}}/share/firebird
61                         --with-fbplugins={{PREFIX}}/libexec/firebird/plugins
62                         --with-fbsbin={{PREFIX}}/sbin
63                         --with-fbsecure-db=/var/db/firebird
64                         --with-fbudf={{PREFIX}}/libexec/firebird/UDF
65                         --with-system-editline
66                         --enable-superserver
67 CONFIGURE_ENV=          PTHREAD_LIBS="-lpthread"
68                         ac_cv_header_atomic_ops_h="no"
69                         ac_cv_lib_atomic_ops_main="no"
70                         ac_cv_lib_edit_readline="yes"
71
72 BUILD_TARGET=           firebird_basic libfbembed libfbclient embed_isql
73                         embed_gpre embed_gdef embed_qli extlib
74                         firebird_embedded firebird_server
75 MAKE_ARGS=              PREFIX="{{STAGEDIR}}{{PREFIX}}"
76 MAKE_ENV=               FIREBIRD_TMP="{{WRKDIR}}"
77                         FIREBIRD_LOCK="{{WRKDIR}}"
78 SINGLE_JOB=             yes
79
80 PLIST_SUB=              SOVERSION=2.5.9
81                         SOMINOR=2.5
82                         SOMAJOR=2
83                         LOCALSTATEDIR=/var/db/firebird
84                         CONFDIR=etc/firebird
85 RC_SUBR=                firebird:server
86 SUB_FILES=              pkg-message-server
87 SUB_LIST=               DOCDIR={{STD_DOCDIR}}
88
89 CXXFLAGS=               -std=gnu++98
90                         -fno-lifetime-dse
91 VAR_ARCH[x86_64]=       CFLAGS=-DAMD64
92
93 post-patch:
94         ${FIND} ${WRKSRC} -name "*.sh" -exec ${CHMOD} +x {} \+
95
96 do-install:
97         @${MKDIR} ${STAGEDIR}${PREFIX}/bin \
98                 ${STAGEDIR}${PREFIX}/lib \
99                 ${STAGEDIR}${PREFIX}/include \
100                 ${STAGEDIR}${PREFIX}/sbin \
101                 ${STAGEDIR}${PREFIX}/share/firebird \
102                 ${STAGEDIR}${PREFIX}/etc/firebird \
103                 ${STAGEDIR}${PREFIX}/libexec/firebird/udf \
104                 ${STAGEDIR}/var/db/firebird/help \
105                 ${STAGEDIR}${PREFIX}/libexec/firebird/intl \
106                 ${STAGEDIR}${PREFIX}/libexec/firebird/plugins
107         ${INSTALL_LIB} ${WRKSRC}/gen/firebird/lib/libib_util.so \
108                 ${WRKSRC}/gen/firebird/lib/libfbclient.so.2.5.9 \
109                 ${WRKSRC}/gen/firebird/lib/libfbembed.so.2.5.9 \
110                 ${STAGEDIR}${PREFIX}/lib
111 .for ext in so so.2 so.2.5
112         ${LN} -fs libfbclient.so.2.5.9 ${STAGEDIR}${PREFIX}/lib/libfbclient.${ext}
113         ${LN} -fs libfbembed.so.2.5.9 ${STAGEDIR}${PREFIX}/lib/libfbembed.${ext}
114         ${LN} -fs libfbembed.so.2.5.9 ${STAGEDIR}${PREFIX}/lib/libgds.${ext}
115 .endfor
116         ${INSTALL_DATA} ${WRKSRC}/gen/firebird/include/*.h ${STAGEDIR}${PREFIX}/include
117         ${INSTALL_DATA} ${WRKSRC}/gen/firebird/*.msg ${STAGEDIR}${PREFIX}/share/firebird
118         ${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${WRKSRC}/gen/install/misc/firebird.conf \
119                 > ${WRKDIR}/firebird.conf
120         ${INSTALL_DATA} ${WRKDIR}/firebird.conf ${STAGEDIR}${PREFIX}/etc/firebird/firebird.conf.sample
121         ${INSTALL_DATA} ${WRKSRC}/gen/install/misc/aliases.conf \
122                 ${STAGEDIR}${PREFIX}/etc/firebird/aliases.conf.sample
123         ${INSTALL_DATA} ${WRKSRC}/gen/install/misc/fbtrace.conf \
124                 ${STAGEDIR}${PREFIX}/etc/firebird/fbtrace.conf
125         ${INSTALL_DATA} ${WRKSRC}/gen/install/misc/fbintl.conf \
126                 ${STAGEDIR}${PREFIX}/libexec/firebird/intl/fbintl.conf
127 .for bin in gpre isql-fb qli fbguard fbsplit fbstat fbsvcmgr fbtracemgr gbak gdef gfix gsec nbackup
128         ${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/bin/${bin} ${STAGEDIR}${PREFIX}/bin
129 .endfor
130 .for sbin in fb_inet_server fb_lock_print fb_smp_server fbserver
131         ${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/bin/${sbin} ${STAGEDIR}${PREFIX}/sbin
132 .endfor
133 .for udf_so in ib_udf.so fbudf.so
134         ${INSTALL} ${STRIP} -m 0555 ${WRKSRC}/gen/firebird/UDF/${udf_so} \
135                 ${STAGEDIR}${PREFIX}/libexec/firebird/udf
136 .endfor
137 .for udf_sql in src/extlib/ib_udf2.sql src/extlib/fbudf/fbudf.sql
138         ${INSTALL} -m 0444 ${WRKSRC}/${udf_sql} ${STAGEDIR}${PREFIX}/libexec/firebird/udf
139 .endfor
140         ${INSTALL} ${STRIP} -m 0555 ${WRKSRC}/gen/firebird/plugins/libfbtrace.so \
141                 ${STAGEDIR}${PREFIX}/libexec/firebird/plugins
142         ${INSTALL} -m 0660 ${WRKSRC}/gen/firebird/security2.fdb \
143                 ${STAGEDIR}/var/db/firebird/security2.fdb.sample
144         ${INSTALL} -m 0440 ${WRKSRC}/gen/firebird/help/help.fdb \
145                 ${STAGEDIR}/var/db/firebird/help
146         ${INSTALL} ${STRIP} -m 0555 ${WRKSRC}/gen/firebird/intl/libfbintl.so \
147                 ${STAGEDIR}${PREFIX}/libexec/firebird/intl/fbintl.so
148         # docs
149         @${MKDIR} ${STAGEDIR}${STD_DOCDIR}/sql.extensions \
150                 ${STAGEDIR}${STD_DOCDIR}/license \
151                 ${STAGEDIR}${STD_DOCDIR}/upgrade
152         ${INSTALL_DATA} ${WRKSRC}/doc/sql.extensions/* \
153                 ${STAGEDIR}${STD_DOCDIR}/sql.extensions
154         ${INSTALL_DATA} ${WRKSRC}/doc/license/* \
155                 ${STAGEDIR}${STD_DOCDIR}/license
156         ${INSTALL_DATA} ${WRKSRC}/src/misc/upgrade/v2/* \
157                 ${STAGEDIR}${STD_DOCDIR}/upgrade
158 .for F in WhatsNew README.* Firebird* ReleaseNotes.pdf ambiguity.txt ods11-index-structure.html
159         ${INSTALL_DATA} ${WRKSRC}/doc/${F} ${STAGEDIR}${STD_DOCDIR}
160 .endfor
161
162 [FILE:568:descriptions/desc.server]
163 Firebird is a relational database offering many ANSI SQL-99 features
164 that runs on Linux, Windows, and a variety of Unix platforms.  Firebird
165 offers excellent concurrency, high performance, and powerful language
166 support for stored procedures and triggers.  It has been used in
167 production systems, under a variety of names since 1981.
168
169 Firebird is completely free of any registration, licensing or deployment
170 fees.  It may be deployed freely for use with any third-party software,
171 whether commercial or not.
172
173 This package contains the Firebird server and related files.
174
175
176 [FILE:193:descriptions/desc.client]
177 Firebird is a relational database offering many ANSI SQL-99 features
178 that runs on Linux, Windows, and a variety of Unix platforms.
179
180 This package contains the Firebird client and related files.
181
182
183 [FILE:109:distinfo]
184 46ee37b14b44f3e45cd286b739f92e9366643f52bef51a131cc973a6980d9481     13567295 Firebird-2.5.9.27139-0.tar.bz2
185
186
187 [FILE:870:manifests/plist.server]
188 @sample %%CONFDIR%%/aliases.conf.sample
189 @sample %%LOCALSTATEDIR%%/security2.fdb.sample
190 %%CONFDIR%%/fbtrace.conf
191 @(firebird,firebird,) %%LOCALSTATEDIR%%/help/help.fdb
192 bin/
193  fbguard
194  fbsplit
195  fbstat
196  fbsvcmgr
197  fbtracemgr
198  gbak
199  gdef
200  gfix
201  gsec
202  nbackup
203 @(,firebird,) libexec/firebird/intl/fbintl.conf
204 @(,firebird,) libexec/firebird/intl/fbintl.so
205 @(,firebird,) libexec/firebird/plugins/libfbtrace.so
206 @(,firebird,) libexec/firebird/udf/fbudf.so
207 @(,firebird,) libexec/firebird/udf/fbudf.sql
208 @(,firebird,) libexec/firebird/udf/ib_udf.so
209 @(,firebird,) libexec/firebird/udf/ib_udf2.sql
210 sbin/
211  fb_inet_server
212  fb_lock_print
213  fb_smp_server
214  fbserver
215 @preunexec [ -s %%LOCALSTATEDIR%%/firebird.log ] || rm -f %%LOCALSTATEDIR%%/firebird.log
216 @rmtry %%LOCALSTATEDIR%%/isc_event1.`hostname`
217 @rmtry %%LOCALSTATEDIR%%/isc_init1.`hostname`
218 @rmtry %%LOCALSTATEDIR%%/isc_lock1.`hostname`
219
220
221 [FILE:338:manifests/plist.client]
222 @sample %%CONFDIR%%/firebird.conf.sample
223 bin/
224  gpre
225  isql-fb
226  qli
227 lib/
228  libfbclient.so.%%SOMAJOR%%
229  libfbclient.so.%%SOMINOR%%
230  libfbclient.so.%%SOVERSION%%
231  libfbembed.so.%%SOMAJOR%%
232  libfbembed.so.%%SOMINOR%%
233  libfbembed.so.%%SOVERSION%%
234  libgds.so.%%SOMAJOR%%
235  libgds.so.%%SOMINOR%%
236 share/firebird/
237  de_DE.msg
238  firebird.msg
239  fr_FR.msg
240
241
242 [FILE:110:manifests/plist.dev]
243 include/
244  ib_util.h
245  ibase.h
246  iberror.h
247  perf.h
248 lib/
249  libfbclient.so
250  libfbembed.so
251  libgds.so
252  libib_util.so
253
254
255 [FILE:416:patches/patch-builds_install_misc_firebird.conf.in]
256 --- builds/install/misc/firebird.conf.in.orig   2019-06-17 15:15:52 UTC
257 +++ builds/install/misc/firebird.conf.in
258 @@ -60,7 +60,7 @@
259  #
260  # Type: string
261  #
262 -#RootDirectory =
263 +#RootDirectory = /var/db/firebird
264  
265  
266  # ----------------------------
267 @@ -137,7 +137,7 @@
268  #
269  # Type: string (special format)
270  #
271 -#UdfAccess = Restrict UDF
272 +UdfAccess = Restrict %%PREFIX%%/libexec/firebird/udf
273  
274  
275  # ----------------------------
276
277
278 [FILE:471:patches/patch-builds_posix_Makefile.in.extern.icu]
279 --- builds/posix/Makefile.in.extern.icu.orig    2019-06-17 15:15:52 UTC
280 +++ builds/posix/Makefile.in.extern.icu
281 @@ -37,6 +37,6 @@ ALL_ICU_SO = $(addsuffix *, $(notdir $(L
282  
283  libicu:
284         $(MAKE) -C $(ROOT)/extern/icu/source
285 -       (cd $(ROOT)/extern/icu/source/lib/; tar cf - $(ALL_ICU_SO)) | (cd $(LIB); tar xf -)
286 +       (cd $(ROOT)/extern/icu/source/lib/; tar cf - $(ALL_ICU_SO)) | (cd $(LIB); tar xf - --no-same-owner --no-same-permissions)
287  
288  include $(ROOT)/gen/make.shared.targets
289
290
291 [FILE:2233:patches/patch-builds_posix_make.defaults]
292 --- builds/posix/make.defaults.orig     2019-06-17 15:15:52 UTC
293 +++ builds/posix/make.defaults
294 @@ -126,7 +126,7 @@ RM_R=               rm -rf
295  CHMOD=                 chmod
296  CHMOD_6=               chmod 666
297  CHMOD_7=               chmod 777
298 -CHMOD_S7=              chmod 06777
299 +CHMOD_S7=              chmod 04555
300  MV=                    mv -f
301  TOUCH=                 touch
302  CP=                    cp
303 @@ -152,7 +152,7 @@ EXE_LINK:= @CXX@ $(GLOB_OPTIONS) $(CXXFL
304  STATICEXE_LINK:= @CXX@ $(GLOB_OPTIONS) $(CXXFLAGS)
305  
306  LINK_LIBS = @LIBS@
307 -ICU_LIBS = -licuuc -licudata -licui18n
308 +ICU_LIBS = -lsicuuc -lsicudata -lsicui18n
309  STATICLINK_LIBS = @LIBS@
310  SO_LINK_LIBS = @LIBS@
311  
312 @@ -223,15 +223,14 @@ LIBFBSTATIC_A = $(LIB)/libfbstatic.a
313  
314  ifeq ($(EDITLINE_FLG),Y)
315    ifeq ($(STD_EDITLINE), true)
316 -       LIBEDITLINE := -l$(READLINE)
317 +       LIBEDITLINE := $(shell pkgconf libedit --libs)
318    else
319         LIBEDITLINE := $(LIB)/libedit.a
320    endif
321  endif
322  
323 -LIBICU_SO = $(LIB)/$(LIB_PREFIX)icuuc*.$(SHRLIB_FOREIGN_EXT) \
324 -                       $(LIB)/$(LIB_PREFIX)icudata*.$(SHRLIB_FOREIGN_EXT) \
325 -                       $(LIB)/$(LIB_PREFIX)icui18n*.$(SHRLIB_FOREIGN_EXT)
326 +LIBICU_SO = $(LIB)/$(LIB_PREFIX)sicuuc*.a $(LIB)/$(LIB_PREFIX)sicudata*.a \
327 +               $(LIB)/$(LIB_PREFIX)sicui18n*.a
328  
329  # Shared library name for usage inside of the UDF
330  IbUtilLibraryName = $(LIB_PREFIX)ib_util.$(SHRLIB_EXT)
331 @@ -305,7 +304,7 @@ CREATE_DB   = $(BIN)/create_db$(EXEC_EXT)
332  GDS_DROP       = $(BIN)/gds_drop$(EXEC_EXT)
333  FBSVCMGR       = $(BIN)/fbsvcmgr$(EXEC_EXT)
334  FBTRACEMGR     = $(BIN)/fbtracemgr$(EXEC_EXT)
335 -GSTAT          = $(BIN)/gstat$(EXEC_EXT)
336 +GSTAT          = $(BIN)/fbstat$(EXEC_EXT)
337  NBACKUP                = $(BIN)/nbackup$(EXEC_EXT)
338  FBTRACE                = $(PLUGINS)/$(LIB_PREFIX)fbtrace.$(SHRLIB_EXT)
339  LOCKPRINT      = $(BIN)/fb_lock_print$(EXEC_EXT)
340 @@ -327,14 +326,14 @@ ISC_GBAK  = $(BIN)/security.gbak
341  QLI            = $(BIN)/qli$(EXEC_EXT)
342  
343  # From isql
344 -ISQL            = $(BIN)/isql$(EXEC_EXT)
345 -ISQL_STATIC     = $(BIN)/isql_static$(EXEC_EXT)
346 -MUISQL          = $(BIN)/muisql$(EXEC_EXT)
347 +ISQL            = $(BIN)/isql-fb$(EXEC_EXT)
348 +ISQL_STATIC     = $(BIN)/isql-fb_static$(EXEC_EXT)
349 +MUISQL          = $(BIN)/muisql-fb$(EXEC_EXT)
350  
351  # From burp
352  GBAK_STATIC     = $(BIN)/gbak_static$(EXEC_EXT)
353  GBAK            = $(BIN)/gbak$(EXEC_EXT)
354 -GSPLIT          = $(BIN)/gsplit$(EXEC_EXT)
355 +GSPLIT          = $(BIN)/fbsplit$(EXEC_EXT)
356  
357  # From gpre
358  # (gpre current is a link to one of the others)
359
360
361 [FILE:358:patches/patch-builds_posix_make.rules]
362 --- builds/posix/make.rules.orig        2019-06-17 15:15:52 UTC
363 +++ builds/posix/make.rules
364 @@ -37,6 +37,8 @@ WFLAGS:=$(CPPFLAGS) -I$(SRC_ROOT)/includ
365  
366  ifeq ($(STD_ICU),false)
367    WFLAGS:= $(WFLAGS) -I$(ROOT)/extern/icu/source/common -I$(ROOT)/extern/icu/source/i18n
368 +else
369 +  WFLAGS:= $(WFLAGS) $(shell icu-config --cppflags)
370  endif
371  
372  ifeq ($(IsProdTypeBuild),Y)
373
374
375 [FILE:390:patches/patch-builds_posix_prefix.solx86gcc]
376 --- builds/posix/prefix.solx86gcc.orig  2019-06-17 15:15:52 UTC
377 +++ builds/posix/prefix.solx86gcc
378 @@ -32,7 +32,7 @@ ifdef SFIO
379  COMM_SOLX_FLAGS+=$(SFIO_FLAGS) 
380  endif
381  
382 -PROD_FLAGS=-DNDEBUG -w $(COMM_SOLX_FLAGS) -O2 -march=pentium 
383 +PROD_FLAGS=-DNDEBUG -w $(COMM_SOLX_FLAGS) -O2  
384  DEV_FLAGS=$(COMM_SOLX_FLAGS) -ggdb -g3 -p $(WARNINGS)
385  ifdef SFIO
386  LINK_LIBS+=$(SFIO_LDFLAGS) -lstdio -lsfio
387
388
389 [FILE:6361:patches/patch-configure]
390 --- configure.orig      2019-06-17 15:47:04 UTC
391 +++ configure
392 @@ -2428,7 +2428,7 @@ _ACEOF
393      SHRLIB_EXT=so
394      ;;
395  
396 -  amd64-*-freebsd* | x86_64*-*-freebsd* | x86_64*-*-k*bsd*-gnu)
397 +  amd64-*-freebsd* | x86_64*-*-freebsd* | x86_64-*-dragonfly* | x86_64*-*-midnight*)
398      MAKEFILE_PREFIX=freebsd_amd64
399      case "$target" in
400          x86_64*-*-k*bsd-gnu)      # Debian/kFreeBSD
401 @@ -2466,7 +2466,7 @@ _ACEOF
402      SHRLIB_EXT=so
403      ;;
404  
405 -  *-*-freebsd* | *-*-k*bsd*-gnu)
406 +  *-*-freebsd* | *-*-dragonfly* | *-*-midnight*)
407      MAKEFILE_PREFIX=freebsd
408      case "$target" in
409          *-*-k*bsd-gnu)      # Debian/kFreeBSD
410 @@ -2826,23 +2826,11 @@ _ACEOF
411      SHRLIB_EXT=sl
412      libdir=/usr/lib/pa20_64
413      ;;
414 -
415 -  i386-pc-solaris*)
416 -        comp=`echo "$CXX" | cut -c1-2`
417 -    case $comp in
418 -       CC) MAKEFILE_PREFIX=solaris
419 -           ICU_PLATFORM=SOLARISX86
420 -           PTHREAD_CFLAGS=-mt
421 -           PTHREAD_LIBS=-lpthread
422 -           ;;
423 -       *)  MAKEFILE_PREFIX=solx86gcc ;
424 -           ICU_PLATFORM=SOLARISX86GCC ;
425 -           PTHREAD_CFLAGS=-pthreads ;;
426 -    esac
427 -        isa=`isainfo -k`
428 -    if test "$isa" = "amd64"; then
429 -        libdir=/usr/lib/amd64
430 -    fi
431 +  x86_64-*-solaris*)
432 +    MAKEFILE_PREFIX=solx86gcc
433 +    ICU_PLATFORM=SOLARISX86GCC
434 +    PTHREAD_CFLAGS=-pthreads
435 +    libdir=/usr/lib/amd64
436      INSTALL_PREFIX=solaris
437      PLATFORM=solx86
438  
439 @@ -4502,7 +4490,7 @@ $as_echo "$as_me: WARNING: we do not kno
440  $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
441          flag=no
442          case "${host_cpu}-${host_os}" in
443 -                *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
444 +                *-aix* | *-freebsd* | *-dragonfly* | *-darwin* | *-midnight*) flag="-D_THREAD_SAFE";;
445                  *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
446          esac
447          { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
448 @@ -7282,7 +7270,7 @@ darwin* | rhapsody*)
449    lt_cv_deplibs_check_method=pass_all
450    ;;
451  
452 -freebsd* | kfreebsd*-gnu | dragonfly*)
453 +freebsd* | midnight* | dragonfly*)
454    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
455      case $host_cpu in
456      i*86 )
457 @@ -10904,7 +10892,7 @@ if test -z "$aix_libpath"; then aix_libp
458        ;;
459  
460      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
461 -    freebsd* | kfreebsd*-gnu | dragonfly*)
462 +    freebsd* | midnight* | dragonfly*)
463        archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
464        hardcode_libdir_flag_spec='-R$libdir'
465        hardcode_direct=yes
466 @@ -11532,7 +11520,7 @@ kfreebsd*-gnu)
467    dynamic_linker='GNU ld.so'
468    ;;
469  
470 -freebsd* | dragonfly*)
471 +freebsd* | dragonfly* | midnight*)
472    # DragonFly does not have aout.  When/if they implement a new
473    # versioning mechanism, adjust this.
474    if test -x /usr/bin/objformat; then
475 @@ -11582,7 +11570,7 @@ freebsd* | dragonfly*)
476      shlibpath_overrides_runpath=no
477      hardcode_into_libs=yes
478      ;;
479 -  freebsd*) # from 4.6 on
480 +  freebsd*|dragonfly*|midnight*) # from 4.6 on
481      shlibpath_overrides_runpath=yes
482      hardcode_into_libs=yes
483      ;;
484 @@ -14010,7 +13998,7 @@ if test -z "$aix_libpath"; then aix_libp
485    freebsd-elf*)
486      archive_cmds_need_lc_CXX=no
487      ;;
488 -  freebsd* | kfreebsd*-gnu | dragonfly*)
489 +  freebsd* | midnight* | dragonfly*)
490      # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
491      # conventions
492      ld_shlibs_CXX=yes
493 @@ -14838,7 +14826,7 @@ $as_echo_n "checking for $compiler optio
494             ;;
495         esac
496         ;;
497 -      freebsd* | kfreebsd*-gnu | dragonfly*)
498 +      freebsd* | midnight* | dragonfly*)
499         # FreeBSD uses GNU C++
500         ;;
501        hpux9* | hpux10* | hpux11*)
502 @@ -15524,7 +15512,7 @@ kfreebsd*-gnu)
503    dynamic_linker='GNU ld.so'
504    ;;
505  
506 -freebsd* | dragonfly*)
507 +freebsd* | dragonfly* | midnight*)
508    # DragonFly does not have aout.  When/if they implement a new
509    # versioning mechanism, adjust this.
510    if test -x /usr/bin/objformat; then
511 @@ -15574,7 +15562,7 @@ freebsd* | dragonfly*)
512      shlibpath_overrides_runpath=no
513      hardcode_into_libs=yes
514      ;;
515 -  freebsd*) # from 4.6 on
516 +  freebsd*|dragonfly*|midnight*) # from 4.6 on
517      shlibpath_overrides_runpath=yes
518      hardcode_into_libs=yes
519      ;;
520 @@ -17524,7 +17512,7 @@ if test -z "$aix_libpath"; then aix_libp
521        ;;
522  
523      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
524 -    freebsd* | kfreebsd*-gnu | dragonfly*)
525 +    freebsd* | midnight* | dragonfly*)
526        archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
527        hardcode_libdir_flag_spec_F77='-R$libdir'
528        hardcode_direct_F77=yes
529 @@ -18152,7 +18140,7 @@ kfreebsd*-gnu)
530    dynamic_linker='GNU ld.so'
531    ;;
532  
533 -freebsd* | dragonfly*)
534 +freebsd* | dragonfly* | midnight*)
535    # DragonFly does not have aout.  When/if they implement a new
536    # versioning mechanism, adjust this.
537    if test -x /usr/bin/objformat; then
538 @@ -18202,7 +18190,7 @@ freebsd* | dragonfly*)
539      shlibpath_overrides_runpath=no
540      hardcode_into_libs=yes
541      ;;
542 -  freebsd*) # from 4.6 on
543 +  freebsd*|dragonfly*|midnight*) # from 4.6 on
544      shlibpath_overrides_runpath=yes
545      hardcode_into_libs=yes
546      ;;
547 @@ -20159,7 +20147,7 @@ if test -z "$aix_libpath"; then aix_libp
548        ;;
549  
550      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
551 -    freebsd* | kfreebsd*-gnu | dragonfly*)
552 +    freebsd* | midnight* | dragonfly*)
553        archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
554        hardcode_libdir_flag_spec_GCJ='-R$libdir'
555        hardcode_direct_GCJ=yes
556 @@ -20787,7 +20775,7 @@ kfreebsd*-gnu)
557    dynamic_linker='GNU ld.so'
558    ;;
559  
560 -freebsd* | dragonfly*)
561 +freebsd* | dragonfly*| midnight*)
562    # DragonFly does not have aout.  When/if they implement a new
563    # versioning mechanism, adjust this.
564    if test -x /usr/bin/objformat; then
565 @@ -20837,7 +20825,7 @@ freebsd* | dragonfly*)
566      shlibpath_overrides_runpath=no
567      hardcode_into_libs=yes
568      ;;
569 -  freebsd*) # from 4.6 on
570 +  freebsd*|dragonfly*|midnight*) # from 4.6 on
571      shlibpath_overrides_runpath=yes
572      hardcode_into_libs=yes
573      ;;
574 @@ -43408,7 +43396,7 @@ fi
575  
576  (cd extern/icu/source
577  chmod +x runConfigureICU configure install-sh
578 -./runConfigureICU "$ICU_PLATFORM" "$DEBUG_ICU" "$ICU_EXTRAS" --prefix=`pwd`/..)
579 +./runConfigureICU "$ICU_PLATFORM" "$DEBUG_ICU" "$ICU_EXTRAS" --disable-shared --enable-static --prefix=`pwd`/..)
580  fi
581  
582  echo
583
584
585 [FILE:342:patches/patch-extern_icu_source_common_putil.c]
586 --- extern/icu/source/common/putil.c.orig       2019-06-17 15:15:52 UTC
587 +++ extern/icu/source/common/putil.c
588 @@ -43,9 +43,8 @@
589  #ifndef PTX
590  
591  /* Define _XOPEN_SOURCE for Solaris and friends. */
592 -/* NetBSD needs it to be >= 4 */
593 -#ifndef _XOPEN_SOURCE
594 -#define _XOPEN_SOURCE 4
595 +#ifdef __sun__
596 +#define __EXTENSIONS__
597  #endif
598  
599  #if defined(DARWIN)
600
601
602 [FILE:830:patches/patch-extern_icu_source_config_mh-bsd-gcc]
603 --- extern/icu/source/config/mh-bsd-gcc.orig    2019-06-17 15:15:52 UTC
604 +++ extern/icu/source/config/mh-bsd-gcc
605 @@ -26,14 +26,14 @@ STATIC_O = ao
606  
607  ## Compilation rules
608  %.$(STATIC_O): $(srcdir)/%.c
609 -       $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
610 +       $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -fPIC -DPIC -o $@ $<
611  %.o: $(srcdir)/%.c
612 -       $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
613 +       $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -fPIC -DPIC -o $@ $<
614  
615  %.$(STATIC_O): $(srcdir)/%.cpp
616 -       $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
617 +       $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -fPIC -DPIC -o $@ $<
618  %.o: $(srcdir)/%.cpp
619 -       $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
620 +       $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -fPIC -DPIC -o $@ $<
621  
622  
623  ## Dependency rules
624
625
626 [FILE:826:patches/patch-extern_icu_source_config_mh-linux]
627 --- extern/icu/source/config/mh-linux.orig      2019-06-17 15:15:52 UTC
628 +++ extern/icu/source/config/mh-linux
629 @@ -33,14 +33,14 @@ STATIC_O = ao
630  
631  ## Compilation rules
632  %.$(STATIC_O): $(srcdir)/%.c
633 -       $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
634 +       $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -fPIC -DPIC -o $@ $<
635  %.o: $(srcdir)/%.c
636 -       $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
637 +       $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -fPIC -DPIC -o $@ $<
638  
639  %.$(STATIC_O): $(srcdir)/%.cpp
640 -       $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
641 +       $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -fPIC -DPIC -o $@ $<
642  %.o: $(srcdir)/%.cpp
643 -       $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
644 +       $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -fPIC -DPIC -o $@ $<
645  
646  
647  ## Dependency rules
648
649
650 [FILE:291:patches/patch-extern_icu_source_config_mh-solaris-gcc]
651 --- extern/icu/source/config/mh-solaris-gcc.orig        2019-06-17 15:15:52 UTC
652 +++ extern/icu/source/config/mh-solaris-gcc
653 @@ -8,8 +8,6 @@ SHAREDLIBCFLAGS = -fPIC
654  SHAREDLIBCXXFLAGS = -fPIC
655  
656  
657 -THREADSCFLAGS += -threads 
658 -THREADSCXXFLAGS += -threads
659  
660  
661  ## Commands to generate dependency files
662
663
664 [FILE:396:patches/patch-extern_icu_source_configure]
665 --- extern/icu/source/configure.orig    2019-06-17 15:15:52 UTC
666 +++ extern/icu/source/configure
667 @@ -3122,7 +3122,7 @@ alpha*-*-linux-gnu)
668                 icu_cv_host_frag=mh-cygwin-msvc
669         fi ;;
670  *-*-mingw*) icu_cv_host_frag=mh-mingw ;;
671 -*-*-*bsd*)     icu_cv_host_frag=mh-bsd-gcc ;;
672 +*-*-*bsd*|*-*-dragonfly*)      icu_cv_host_frag=mh-bsd-gcc ;;
673  *-*-aix*)
674         if test "$GCC" = yes; then
675                 icu_cv_host_frag=mh-aix-gcc
676
677
678 [FILE:913:patches/patch-extern_icu_source_runConfigureICU]
679 --- extern/icu/source/runConfigureICU.orig      2019-06-17 15:15:52 UTC
680 +++ extern/icu/source/runConfigureICU
681 @@ -175,14 +175,8 @@ case $platform in
682      SOLARISX86GCC)
683          THE_OS="SOLARIS X86"
684          THE_COMP="the GNU C++"
685 -        CC=`which gcc`; export CC
686 -        CXX=`which g++`; export CXX
687 -        C_FLAGS="-w -threads";export C_FLAGS
688 -        CXXFLAGS="$CXXFLAGS -I/usr/local/include/g++ -threads"; export CXXFLAGS
689 -        LDFLAGS="$LDFLAGS -R/usr/local/lib -threads "; export LDFLAGS
690 -        RELEASE_CXXFLAGS=-O
691 -        RELEASE_CFLAGS=-O3
692 -       GENCCODE_ASSEMBLY=-a gcc
693 +        CC=gcc; export CC
694 +        CXX=g++; export CXX
695          ;;
696      SOLARISCC)
697          THE_OS=SOLARIS
698 @@ -299,7 +293,7 @@ case $platform in
699          RELEASE_CFLAGS='-O2'
700          RELEASE_CXXFLAGS='-O2'
701          ;;
702 -    *BSD)
703 +    *BSD|DragonFly)
704          THE_OS="BSD"
705          THE_COMP="the GNU C++"
706          CC=gcc; export CC
707
708
709 [FILE:368:patches/patch-extern_icu_source_tools_genrb_Makefile.in]
710 --- extern/icu/source/tools/genrb/Makefile.in.orig      2019-06-17 15:15:52 UTC
711 +++ extern/icu/source/tools/genrb/Makefile.in
712 @@ -81,7 +81,7 @@ $(TARGET) : $(OBJECTS)
713         $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS) 
714  
715  $(DERB) : $(DERB_OBJ)
716 -       $(LINK.c) $(OUTOPT)$@ $^ $(LIBS) 
717 +       $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS) 
718  
719  
720  # the 'mv' will always fail if you are building in the source dir
721
722
723 [FILE:400:patches/patch-extern_icu_source_tools_pkgdata_Makefile.in]
724 --- extern/icu/source/tools/pkgdata/Makefile.in.orig    2019-06-17 15:15:52 UTC
725 +++ extern/icu/source/tools/pkgdata/Makefile.in
726 @@ -90,7 +90,7 @@ Makefile: $(srcdir)/Makefile.in  $(top_b
727         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
728  
729  $(TARGET) : $(OBJECTS)
730 -       $(LINK.c) $(OUTOPT)$@ $^ $(LIBS) 
731 +       $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS) 
732  
733  ifeq (,$(MAKECMDGOALS))
734  -include $(DEPS)
735
736
737 [FILE:386:patches/patch-src-common-classes_alloc.h]
738 --- src/common/classes/alloc.h.orig     2019-06-17 15:15:52 UTC
739 +++ src/common/classes/alloc.h
740 @@ -92,7 +92,7 @@ namespace Firebird {
741  const int MAX_TREE_DEPTH = 4;
742  
743  // Alignment for all memory blocks. Sizes of memory blocks in headers are measured in this units
744 -const size_t ALLOC_ALIGNMENT = FB_ALIGNMENT;
745 +#define ALLOC_ALIGNMENT 16
746  
747  static inline size_t MEM_ALIGN(size_t value)
748  {
749
750
751 [FILE:397:patches/patch-src_jrd_common.h]
752 --- src/jrd/common.h.orig       2019-06-17 15:15:53 UTC
753 +++ src/jrd/common.h
754 @@ -339,9 +339,6 @@ your operating system.
755  Earlier versions of Solaris still have the problem. pbeach Feb2010
756  */
757  
758 -#if (!defined(__arch64__)) && (!defined(SFIO))
759 -#error "need to use SFIO"
760 -#endif
761  
762  // this function is normally defined in stdio.h, but is missing in SFIO's h-file
763  extern "C" int remove(const char* path);
764
765
766 [FILE:1896:files/firebird.in]
767 #!/bin/sh
768 #
769 # PROVIDE: firebird
770 # REQUIRE: LOGIN
771 # KEYWORD: shutdown
772 #
773 # Add the following line to /etc/rc.conf to enable Firebird Database:
774 #
775 #
776 # firebird_enable:      Set it to "YES" to enable firebird.
777 #                       Default is "NO".
778 # firebird_mode:        Set it to "superclassic" or "superserver" to enable firebird.
779 #                       Default is "superclassic".
780 # firebird_flags:       Set options to run fbserver or fb_smp_server.
781 #                       Default is "-el /var/db/firebird".
782 # firebird_pidfile:     Set full path to pid file.
783 #                       Default is "/var/run/firebird.pid".
784 #
785
786 . /etc/rc.subr
787
788 name=firebird
789 rcvar=firebird_enable
790
791 load_rc_config $name
792
793 firebird_enable=${firebird_enable:-"NO"}
794 firebird_mode=${firebird_mode:-"superclassic"}
795 firebird_flags=${firebird_flags:-"-el /var/db/firebird"}
796 firebird_pidfile=${firebird_pidfile:-"/var/run/${name}.pid"}
797 firebird_user=firebird
798
799 command=%%PREFIX%%/sbin/fb_smp_server
800 command_args="${firebird_flags} &"
801 pidfile=${firebird_pidfile}
802 start_precmd="start_precmd"
803 start_postcmd="start_postcmd"
804 stop_postcmd="stop_postcmd"
805 reload_postcmd="reload_postcmd"
806
807 start_precmd()
808 {
809         touch ${firebird_pidfile}
810         chown "${firebird_user}:wheel" ${firebird_pidfile} ||
811                 err 1 "Cannot chown ${firebird_pidfile}"
812 }
813
814 start_postcmd()
815 {
816         pgrep -u ${firebird_user} ${command_app} > ${firebird_pidfile}
817         echo "Current firebird mode is $firebird_mode"
818 }
819
820 stop_postcmd()
821 {
822         rm -f ${pidfile}
823 }
824
825 reload_postcmd()
826 {
827         rm -f ${pidfile}
828         run_rc_command start
829 }
830
831 case "${firebird_mode}" in
832         superclassic)
833                 command=%%PREFIX%%/sbin/fb_smp_server
834                 command_app=fb_smp_server
835                 ;;
836         superserver)
837                 command=%%PREFIX%%/sbin/fbserver
838                 command_app=fbserver
839                 ;;
840         *)
841                 warn "$firebird_mode is an invalid value for firebird_mode"
842                 return 1
843                 ;;
844 esac
845
846 run_rc_command "$1"
847
848
849 [FILE:838:files/pkg-install-server]
850 #!/bin/sh
851
852 PATH=/bin:/usr/bin:/usr/sbin
853
854 buildwarning() {
855 cat <<EOF
856 ###############################################################################
857
858                              ** IMPORTANT **
859
860 Keep in mind that if you build firebird server as 'root', this may cause
861 conflicts with SysV semaphores of running services.
862
863 If you want to cancel it, press ctrl-C now if you need check some things
864 before of build it.
865
866 ###############################################################################
867 EOF
868         sleep 5
869 }
870
871 case $2 in
872 PRE-INSTALL)
873         buildwarning
874 ;;
875 POST-INSTALL)
876         cd /var/db/firebird
877
878 # Lock files
879
880 for i in isc_init1 isc_lock1 isc_event1
881 do
882         FileName=$i.`hostname`
883         touch $FileName
884         chmod uga=rw $FileName
885         chown firebird:firebird $FileName
886 done
887
888 touch firebird.log
889 chown firebird:firebird firebird.log security2.fdb
890
891 ;;
892
893 esac
894
895
896 [FILE:1468:files/pkg-message-server.in]
897 ###############################################################################
898
899 Firebird was installed.
900
901 1) Support for Super Server has been added
902 2) Before start the server ensure that the following line exists in /etc/services:
903
904 gds_db          3050/tcp  #InterBase Database Remote Protocol
905
906 3) If you use inetd (Classic Server) then add the following line to /etc/inetd.conf
907
908 gds_db  stream  tcp     nowait  firebird        %%PREFIX%%/sbin/fb_inet_server  fb_inet_server
909
910 And finally restart inetd.
911
912 4) If you want to use SuperClassic Server then you must add the following lines
913    to /etc/rc.conf file.
914
915  firebird_enable="YES"
916  firebird_mode="superclassic"
917
918 5) If you want to use Super Server then you must add the following lines to
919    /etc/rc.conf file.
920
921  firebird_enable="YES"
922  firebird_mode="superserver"
923
924  Note: Keep in mind that you only can add one of them but never both modes on
925        the same time
926
927 6) Bedore doing anything serious with Firebird, it is STRONGLY recommended
928    that you change the SYSDBA password with:
929
930  # gsec -user SYSDBA -pass masterkey
931  GSEC> modify SYSDBA -pw newpassword
932  GSEC> quit
933
934 7) See documentation in %%DOCDIR%%/ for more information.
935 8) Some firebird tools were renamed for avoid conflicts with some other ports
936
937         %%PREFIX%%/bin/isql   -> %%PREFIX%%/bin/isql-fb
938         %%PREFIX%%/bin/gstat  -> %%PREFIX%%/bin/fbstat
939         %%PREFIX%%/bin/gsplit -> %%PREFIX%%/bin/fbsplit
940
941 ################################################################################
942
943
944 [FILE:163:dragonfly/patch-builds_posix_empty.vers]
945 --- builds/posix/empty.vers.orig        2019-06-17 15:15:52 UTC
946 +++ builds/posix/empty.vers
947 @@ -27,6 +27,8 @@
948  {
949  global:
950         main;
951 +       __progname;
952 +       environ;
953  
954  local:
955         *;
956
957
958 [FILE:225:dragonfly/patch-builds_posix_firebird.vers]
959 --- builds/posix/firebird.vers.orig     2019-06-17 15:15:52 UTC
960 +++ builds/posix/firebird.vers
961 @@ -25,6 +25,8 @@
962  
963  {
964  global:
965 +       __progname;
966 +       environ;
967  # private entrypoint for REMOTE server
968         server_main;
969  #-------------------
970
971
972 [FILE:163:freebsd/patch-builds_posix_empty.vers]
973 --- builds/posix/empty.vers.orig        2019-06-17 15:15:52 UTC
974 +++ builds/posix/empty.vers
975 @@ -27,6 +27,8 @@
976  {
977  global:
978         main;
979 +       __progname;
980 +       environ;
981  
982  local:
983         *;
984
985
986 [FILE:225:freebsd/patch-builds_posix_firebird.vers]
987 --- builds/posix/firebird.vers.orig     2019-06-17 15:15:52 UTC
988 +++ builds/posix/firebird.vers
989 @@ -25,6 +25,8 @@
990  
991  {
992  global:
993 +       __progname;
994 +       environ;
995  # private entrypoint for REMOTE server
996         server_main;
997  #-------------------
998
999
1000 [FILE:163:midnightbsd/patch-builds_posix_empty.vers]
1001 --- builds/posix/empty.vers.orig        2019-06-17 15:15:52 UTC
1002 +++ builds/posix/empty.vers
1003 @@ -27,6 +27,8 @@
1004  {
1005  global:
1006         main;
1007 +       __progname;
1008 +       environ;
1009  
1010  local:
1011         *;
1012
1013
1014 [FILE:225:midnightbsd/patch-builds_posix_firebird.vers]
1015 --- builds/posix/firebird.vers.orig     2019-06-17 15:15:52 UTC
1016 +++ builds/posix/firebird.vers
1017 @@ -25,6 +25,8 @@
1018  
1019  {
1020  global:
1021 +       __progname;
1022 +       environ;
1023  # private entrypoint for REMOTE server
1024         server_main;
1025  #-------------------
1026