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