Ravenports generated: 06 Mar 2023 03:06
[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:3209: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*-*-k*bsd*-gnu)
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* | *-*-k*bsd*-gnu)
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*) flag="-D_THREAD_SAFE";;
445                  *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
446          esac
447          { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
448 @@ -11582,7 +11570,7 @@ freebsd* | dragonfly*)
449      shlibpath_overrides_runpath=no
450      hardcode_into_libs=yes
451      ;;
452 -  freebsd*) # from 4.6 on
453 +  freebsd*|dragonfly*) # from 4.6 on
454      shlibpath_overrides_runpath=yes
455      hardcode_into_libs=yes
456      ;;
457 @@ -15574,7 +15562,7 @@ freebsd* | dragonfly*)
458      shlibpath_overrides_runpath=no
459      hardcode_into_libs=yes
460      ;;
461 -  freebsd*) # from 4.6 on
462 +  freebsd*|dragonfly*) # from 4.6 on
463      shlibpath_overrides_runpath=yes
464      hardcode_into_libs=yes
465      ;;
466 @@ -18202,7 +18190,7 @@ freebsd* | dragonfly*)
467      shlibpath_overrides_runpath=no
468      hardcode_into_libs=yes
469      ;;
470 -  freebsd*) # from 4.6 on
471 +  freebsd*|dragonfly*) # from 4.6 on
472      shlibpath_overrides_runpath=yes
473      hardcode_into_libs=yes
474      ;;
475 @@ -20837,7 +20825,7 @@ freebsd* | dragonfly*)
476      shlibpath_overrides_runpath=no
477      hardcode_into_libs=yes
478      ;;
479 -  freebsd*) # from 4.6 on
480 +  freebsd*|dragonfly*) # from 4.6 on
481      shlibpath_overrides_runpath=yes
482      hardcode_into_libs=yes
483      ;;
484 @@ -43408,7 +43396,7 @@ fi
485  
486  (cd extern/icu/source
487  chmod +x runConfigureICU configure install-sh
488 -./runConfigureICU "$ICU_PLATFORM" "$DEBUG_ICU" "$ICU_EXTRAS" --prefix=`pwd`/..)
489 +./runConfigureICU "$ICU_PLATFORM" "$DEBUG_ICU" "$ICU_EXTRAS" --disable-shared --enable-static --prefix=`pwd`/..)
490  fi
491  
492  echo
493
494
495 [FILE:342:patches/patch-extern_icu_source_common_putil.c]
496 --- extern/icu/source/common/putil.c.orig       2019-06-17 15:15:52 UTC
497 +++ extern/icu/source/common/putil.c
498 @@ -43,9 +43,8 @@
499  #ifndef PTX
500  
501  /* Define _XOPEN_SOURCE for Solaris and friends. */
502 -/* NetBSD needs it to be >= 4 */
503 -#ifndef _XOPEN_SOURCE
504 -#define _XOPEN_SOURCE 4
505 +#ifdef __sun__
506 +#define __EXTENSIONS__
507  #endif
508  
509  #if defined(DARWIN)
510
511
512 [FILE:830:patches/patch-extern_icu_source_config_mh-bsd-gcc]
513 --- extern/icu/source/config/mh-bsd-gcc.orig    2019-06-17 15:15:52 UTC
514 +++ extern/icu/source/config/mh-bsd-gcc
515 @@ -26,14 +26,14 @@ STATIC_O = ao
516  
517  ## Compilation rules
518  %.$(STATIC_O): $(srcdir)/%.c
519 -       $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
520 +       $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -fPIC -DPIC -o $@ $<
521  %.o: $(srcdir)/%.c
522 -       $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
523 +       $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -fPIC -DPIC -o $@ $<
524  
525  %.$(STATIC_O): $(srcdir)/%.cpp
526 -       $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
527 +       $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -fPIC -DPIC -o $@ $<
528  %.o: $(srcdir)/%.cpp
529 -       $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
530 +       $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -fPIC -DPIC -o $@ $<
531  
532  
533  ## Dependency rules
534
535
536 [FILE:826:patches/patch-extern_icu_source_config_mh-linux]
537 --- extern/icu/source/config/mh-linux.orig      2019-06-17 15:15:52 UTC
538 +++ extern/icu/source/config/mh-linux
539 @@ -33,14 +33,14 @@ STATIC_O = ao
540  
541  ## Compilation rules
542  %.$(STATIC_O): $(srcdir)/%.c
543 -       $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
544 +       $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -fPIC -DPIC -o $@ $<
545  %.o: $(srcdir)/%.c
546 -       $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
547 +       $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -fPIC -DPIC -o $@ $<
548  
549  %.$(STATIC_O): $(srcdir)/%.cpp
550 -       $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
551 +       $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -fPIC -DPIC -o $@ $<
552  %.o: $(srcdir)/%.cpp
553 -       $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
554 +       $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -fPIC -DPIC -o $@ $<
555  
556  
557  ## Dependency rules
558
559
560 [FILE:291:patches/patch-extern_icu_source_config_mh-solaris-gcc]
561 --- extern/icu/source/config/mh-solaris-gcc.orig        2019-06-17 15:15:52 UTC
562 +++ extern/icu/source/config/mh-solaris-gcc
563 @@ -8,8 +8,6 @@ SHAREDLIBCFLAGS = -fPIC
564  SHAREDLIBCXXFLAGS = -fPIC
565  
566  
567 -THREADSCFLAGS += -threads 
568 -THREADSCXXFLAGS += -threads
569  
570  
571  ## Commands to generate dependency files
572
573
574 [FILE:396:patches/patch-extern_icu_source_configure]
575 --- extern/icu/source/configure.orig    2019-06-17 15:15:52 UTC
576 +++ extern/icu/source/configure
577 @@ -3122,7 +3122,7 @@ alpha*-*-linux-gnu)
578                 icu_cv_host_frag=mh-cygwin-msvc
579         fi ;;
580  *-*-mingw*) icu_cv_host_frag=mh-mingw ;;
581 -*-*-*bsd*)     icu_cv_host_frag=mh-bsd-gcc ;;
582 +*-*-*bsd*|*-*-dragonfly*)      icu_cv_host_frag=mh-bsd-gcc ;;
583  *-*-aix*)
584         if test "$GCC" = yes; then
585                 icu_cv_host_frag=mh-aix-gcc
586
587
588 [FILE:913:patches/patch-extern_icu_source_runConfigureICU]
589 --- extern/icu/source/runConfigureICU.orig      2019-06-17 15:15:52 UTC
590 +++ extern/icu/source/runConfigureICU
591 @@ -175,14 +175,8 @@ case $platform in
592      SOLARISX86GCC)
593          THE_OS="SOLARIS X86"
594          THE_COMP="the GNU C++"
595 -        CC=`which gcc`; export CC
596 -        CXX=`which g++`; export CXX
597 -        C_FLAGS="-w -threads";export C_FLAGS
598 -        CXXFLAGS="$CXXFLAGS -I/usr/local/include/g++ -threads"; export CXXFLAGS
599 -        LDFLAGS="$LDFLAGS -R/usr/local/lib -threads "; export LDFLAGS
600 -        RELEASE_CXXFLAGS=-O
601 -        RELEASE_CFLAGS=-O3
602 -       GENCCODE_ASSEMBLY=-a gcc
603 +        CC=gcc; export CC
604 +        CXX=g++; export CXX
605          ;;
606      SOLARISCC)
607          THE_OS=SOLARIS
608 @@ -299,7 +293,7 @@ case $platform in
609          RELEASE_CFLAGS='-O2'
610          RELEASE_CXXFLAGS='-O2'
611          ;;
612 -    *BSD)
613 +    *BSD|DragonFly)
614          THE_OS="BSD"
615          THE_COMP="the GNU C++"
616          CC=gcc; export CC
617
618
619 [FILE:368:patches/patch-extern_icu_source_tools_genrb_Makefile.in]
620 --- extern/icu/source/tools/genrb/Makefile.in.orig      2019-06-17 15:15:52 UTC
621 +++ extern/icu/source/tools/genrb/Makefile.in
622 @@ -81,7 +81,7 @@ $(TARGET) : $(OBJECTS)
623         $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS) 
624  
625  $(DERB) : $(DERB_OBJ)
626 -       $(LINK.c) $(OUTOPT)$@ $^ $(LIBS) 
627 +       $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS) 
628  
629  
630  # the 'mv' will always fail if you are building in the source dir
631
632
633 [FILE:400:patches/patch-extern_icu_source_tools_pkgdata_Makefile.in]
634 --- extern/icu/source/tools/pkgdata/Makefile.in.orig    2019-06-17 15:15:52 UTC
635 +++ extern/icu/source/tools/pkgdata/Makefile.in
636 @@ -90,7 +90,7 @@ Makefile: $(srcdir)/Makefile.in  $(top_b
637         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
638  
639  $(TARGET) : $(OBJECTS)
640 -       $(LINK.c) $(OUTOPT)$@ $^ $(LIBS) 
641 +       $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS) 
642  
643  ifeq (,$(MAKECMDGOALS))
644  -include $(DEPS)
645
646
647 [FILE:386:patches/patch-src-common-classes_alloc.h]
648 --- src/common/classes/alloc.h.orig     2019-06-17 15:15:52 UTC
649 +++ src/common/classes/alloc.h
650 @@ -92,7 +92,7 @@ namespace Firebird {
651  const int MAX_TREE_DEPTH = 4;
652  
653  // Alignment for all memory blocks. Sizes of memory blocks in headers are measured in this units
654 -const size_t ALLOC_ALIGNMENT = FB_ALIGNMENT;
655 +#define ALLOC_ALIGNMENT 16
656  
657  static inline size_t MEM_ALIGN(size_t value)
658  {
659
660
661 [FILE:397:patches/patch-src_jrd_common.h]
662 --- src/jrd/common.h.orig       2019-06-17 15:15:53 UTC
663 +++ src/jrd/common.h
664 @@ -339,9 +339,6 @@ your operating system.
665  Earlier versions of Solaris still have the problem. pbeach Feb2010
666  */
667  
668 -#if (!defined(__arch64__)) && (!defined(SFIO))
669 -#error "need to use SFIO"
670 -#endif
671  
672  // this function is normally defined in stdio.h, but is missing in SFIO's h-file
673  extern "C" int remove(const char* path);
674
675
676 [FILE:1896:files/firebird.in]
677 #!/bin/sh
678 #
679 # PROVIDE: firebird
680 # REQUIRE: LOGIN
681 # KEYWORD: shutdown
682 #
683 # Add the following line to /etc/rc.conf to enable Firebird Database:
684 #
685 #
686 # firebird_enable:      Set it to "YES" to enable firebird.
687 #                       Default is "NO".
688 # firebird_mode:        Set it to "superclassic" or "superserver" to enable firebird.
689 #                       Default is "superclassic".
690 # firebird_flags:       Set options to run fbserver or fb_smp_server.
691 #                       Default is "-el /var/db/firebird".
692 # firebird_pidfile:     Set full path to pid file.
693 #                       Default is "/var/run/firebird.pid".
694 #
695
696 . /etc/rc.subr
697
698 name=firebird
699 rcvar=firebird_enable
700
701 load_rc_config $name
702
703 firebird_enable=${firebird_enable:-"NO"}
704 firebird_mode=${firebird_mode:-"superclassic"}
705 firebird_flags=${firebird_flags:-"-el /var/db/firebird"}
706 firebird_pidfile=${firebird_pidfile:-"/var/run/${name}.pid"}
707 firebird_user=firebird
708
709 command=%%PREFIX%%/sbin/fb_smp_server
710 command_args="${firebird_flags} &"
711 pidfile=${firebird_pidfile}
712 start_precmd="start_precmd"
713 start_postcmd="start_postcmd"
714 stop_postcmd="stop_postcmd"
715 reload_postcmd="reload_postcmd"
716
717 start_precmd()
718 {
719         touch ${firebird_pidfile}
720         chown "${firebird_user}:wheel" ${firebird_pidfile} ||
721                 err 1 "Cannot chown ${firebird_pidfile}"
722 }
723
724 start_postcmd()
725 {
726         pgrep -u ${firebird_user} ${command_app} > ${firebird_pidfile}
727         echo "Current firebird mode is $firebird_mode"
728 }
729
730 stop_postcmd()
731 {
732         rm -f ${pidfile}
733 }
734
735 reload_postcmd()
736 {
737         rm -f ${pidfile}
738         run_rc_command start
739 }
740
741 case "${firebird_mode}" in
742         superclassic)
743                 command=%%PREFIX%%/sbin/fb_smp_server
744                 command_app=fb_smp_server
745                 ;;
746         superserver)
747                 command=%%PREFIX%%/sbin/fbserver
748                 command_app=fbserver
749                 ;;
750         *)
751                 warn "$firebird_mode is an invalid value for firebird_mode"
752                 return 1
753                 ;;
754 esac
755
756 run_rc_command "$1"
757
758
759 [FILE:838:files/pkg-install-server]
760 #!/bin/sh
761
762 PATH=/bin:/usr/bin:/usr/sbin
763
764 buildwarning() {
765 cat <<EOF
766 ###############################################################################
767
768                              ** IMPORTANT **
769
770 Keep in mind that if you build firebird server as 'root', this may cause
771 conflicts with SysV semaphores of running services.
772
773 If you want to cancel it, press ctrl-C now if you need check some things
774 before of build it.
775
776 ###############################################################################
777 EOF
778         sleep 5
779 }
780
781 case $2 in
782 PRE-INSTALL)
783         buildwarning
784 ;;
785 POST-INSTALL)
786         cd /var/db/firebird
787
788 # Lock files
789
790 for i in isc_init1 isc_lock1 isc_event1
791 do
792         FileName=$i.`hostname`
793         touch $FileName
794         chmod uga=rw $FileName
795         chown firebird:firebird $FileName
796 done
797
798 touch firebird.log
799 chown firebird:firebird firebird.log security2.fdb
800
801 ;;
802
803 esac
804
805
806 [FILE:1468:files/pkg-message-server.in]
807 ###############################################################################
808
809 Firebird was installed.
810
811 1) Support for Super Server has been added
812 2) Before start the server ensure that the following line exists in /etc/services:
813
814 gds_db          3050/tcp  #InterBase Database Remote Protocol
815
816 3) If you use inetd (Classic Server) then add the following line to /etc/inetd.conf
817
818 gds_db  stream  tcp     nowait  firebird        %%PREFIX%%/sbin/fb_inet_server  fb_inet_server
819
820 And finally restart inetd.
821
822 4) If you want to use SuperClassic Server then you must add the following lines
823    to /etc/rc.conf file.
824
825  firebird_enable="YES"
826  firebird_mode="superclassic"
827
828 5) If you want to use Super Server then you must add the following lines to
829    /etc/rc.conf file.
830
831  firebird_enable="YES"
832  firebird_mode="superserver"
833
834  Note: Keep in mind that you only can add one of them but never both modes on
835        the same time
836
837 6) Bedore doing anything serious with Firebird, it is STRONGLY recommended
838    that you change the SYSDBA password with:
839
840  # gsec -user SYSDBA -pass masterkey
841  GSEC> modify SYSDBA -pw newpassword
842  GSEC> quit
843
844 7) See documentation in %%DOCDIR%%/ for more information.
845 8) Some firebird tools were renamed for avoid conflicts with some other ports
846
847         %%PREFIX%%/bin/isql   -> %%PREFIX%%/bin/isql-fb
848         %%PREFIX%%/bin/gstat  -> %%PREFIX%%/bin/fbstat
849         %%PREFIX%%/bin/gsplit -> %%PREFIX%%/bin/fbsplit
850
851 ################################################################################
852
853
854 [FILE:163:dragonfly/patch-builds_posix_empty.vers]
855 --- builds/posix/empty.vers.orig        2019-06-17 15:15:52 UTC
856 +++ builds/posix/empty.vers
857 @@ -27,6 +27,8 @@
858  {
859  global:
860         main;
861 +       __progname;
862 +       environ;
863  
864  local:
865         *;
866
867
868 [FILE:225:dragonfly/patch-builds_posix_firebird.vers]
869 --- builds/posix/firebird.vers.orig     2019-06-17 15:15:52 UTC
870 +++ builds/posix/firebird.vers
871 @@ -25,6 +25,8 @@
872  
873  {
874  global:
875 +       __progname;
876 +       environ;
877  # private entrypoint for REMOTE server
878         server_main;
879  #-------------------
880
881
882 [FILE:163:freebsd/patch-builds_posix_empty.vers]
883 --- builds/posix/empty.vers.orig        2019-06-17 15:15:52 UTC
884 +++ builds/posix/empty.vers
885 @@ -27,6 +27,8 @@
886  {
887  global:
888         main;
889 +       __progname;
890 +       environ;
891  
892  local:
893         *;
894
895
896 [FILE:225:freebsd/patch-builds_posix_firebird.vers]
897 --- builds/posix/firebird.vers.orig     2019-06-17 15:15:52 UTC
898 +++ builds/posix/firebird.vers
899 @@ -25,6 +25,8 @@
900  
901  {
902  global:
903 +       __progname;
904 +       environ;
905  # private entrypoint for REMOTE server
906         server_main;
907  #-------------------
908