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