mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-12 14:50:08 +02:00
x86_64 is used as a baseline: the "x86_64" entry, whatever status it has, is transformed into "all", and then the other entries in ARCHITECTURES either dropped or rearranged appropriately.
223 lines
7.6 KiB
Bash
223 lines
7.6 KiB
Bash
SUMMARY="A powerful object-relational database system"
|
|
DESCRIPTION="PostgreSQL is a powerful, open source object-relational database \
|
|
system that uses and extends the SQL language combined with many features \
|
|
that safely store and scale the most complicated data workloads. The origins \
|
|
of PostgreSQL date back to 1986 as part of the POSTGRES project at the \
|
|
University of California at Berkeley and has more than 30 years of active \
|
|
development on the core platform.
|
|
|
|
PostgreSQL has earned a strong reputation for its proven architecture, \
|
|
reliability, data integrity, robust feature set, extensibility, and the \
|
|
dedication of the open source community behind the software to consistently \
|
|
deliver performant and innovative solutions. PostgreSQL runs on all major \
|
|
operating systems, has been ACID-compliant since 2001, and has powerful \
|
|
add-ons such as the popular PostGIS geospatial database extender. It is no \
|
|
surprise that PostgreSQL has become the open source relational database of \
|
|
choice for many people and organisations.
|
|
|
|
Getting started with using PostgreSQL has never been easier - pick a project \
|
|
you want to build, and let PostgreSQL safely and robustly store your data."
|
|
HOMEPAGE="https://www.postgresql.org/"
|
|
COPYRIGHT="1996-2019 PostgreSQL Global Development Group"
|
|
LICENSE="PostgreSQL"
|
|
REVISION="3"
|
|
SOURCE_URI="http://ftp.postgresql.org/pub/source/v$portVersion/postgresql-$portVersion.tar.bz2"
|
|
CHECKSUM_SHA256="cda2397215f758b793f741c86be05468257b0e6bcb1a6113882ab5d0df0855c6"
|
|
SOURCE_DIR="postgresql-$portVersion"
|
|
PATCHES="postgresql12-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2 ?x86"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
portVersionCompat="$portVersion compat >= ${portVersion%.*}"
|
|
|
|
PROVIDES="
|
|
postgresql12$secondaryArchSuffix = $portVersionCompat
|
|
cmd:psql$secondaryArchSuffix = $portVersionCompat
|
|
lib:libecpg$secondaryArchSuffix = $portVersionCompat
|
|
lib:libecpg_compat$secondaryArchSuffix = $portVersionCompat
|
|
lib:libpgtypes$secondaryArchSuffix = $portVersionCompat
|
|
lib:libpq$secondaryArchSuffix = $portVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libcrypto$secondaryArchSuffix
|
|
lib:libicudata$secondaryArchSuffix >= 66
|
|
lib:libicui18n$secondaryArchSuffix >= 66
|
|
lib:libicuuc$secondaryArchSuffix >= 66
|
|
lib:libldap_r_2.4$secondaryArchSuffix
|
|
lib:libpam$secondaryArchSuffix
|
|
lib:libreadline$secondaryArchSuffix
|
|
lib:libssl$secondaryArchSuffix
|
|
lib:libxml2$secondaryArchSuffix
|
|
lib:libxslt$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_server="
|
|
postgresql12${secondaryArchSuffix}_server = $portVersionCompat
|
|
cmd:clusterdb$secondaryArchSuffix = $portVersionCompat
|
|
cmd:createdb$secondaryArchSuffix = $portVersionCompat
|
|
cmd:createlang$secondaryArchSuffix = $portVersionCompat
|
|
cmd:createuser$secondaryArchSuffix = $portVersionCompat
|
|
cmd:dropdb$secondaryArchSuffix = $portVersionCompat
|
|
cmd:droplang$secondaryArchSuffix = $portVersionCompat
|
|
cmd:dropuser$secondaryArchSuffix = $portVersionCompat
|
|
cmd:ecpg$secondaryArchSuffix = $portVersionCompat
|
|
cmd:initdb$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_archivecleanup$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_basebackup$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_checksums$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_config$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_controldata$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_ctl$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_dump$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_dumpall$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_isready$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_receivewal$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_receivexlog$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_recvlogical$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_resetwal$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_resetxlog$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_restore$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_rewind$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_test_fsync$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_test_timing$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_upgrade$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_verify_checksums$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_waldump$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pg_xlogdump$secondaryArchSuffix = $portVersionCompat
|
|
cmd:pgbench$secondaryArchSuffix = $portVersionCompat
|
|
cmd:postgres$secondaryArchSuffix = $portVersionCompat
|
|
cmd:postmaster$secondaryArchSuffix = $portVersionCompat
|
|
cmd:reindexdb$secondaryArchSuffix = $portVersionCompat
|
|
cmd:vacuumdb$secondaryArchSuffix = $portVersionCompat
|
|
"
|
|
REQUIRES_server="
|
|
haiku$secondaryArchSuffix
|
|
postgresql12${secondaryArchSuffix} == $portVersion base
|
|
lib:libcrypto$secondaryArchSuffix
|
|
lib:libicudata$secondaryArchSuffix >= 66
|
|
lib:libicui18n$secondaryArchSuffix >= 66
|
|
lib:libicuuc$secondaryArchSuffix >= 66
|
|
lib:libldap_r_2.4$secondaryArchSuffix
|
|
lib:libpam$secondaryArchSuffix
|
|
lib:libpq$secondaryArchSuffix
|
|
lib:libreadline$secondaryArchSuffix
|
|
lib:libssl$secondaryArchSuffix
|
|
lib:libxml2$secondaryArchSuffix
|
|
lib:libxslt$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
postgresql12${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libpgport$secondaryArchSuffix = $portVersion
|
|
devel:libpgcommon$secondaryArchSuffix = $portVersion
|
|
devel:libpgcommon_shlib$secondaryArchSuffix = $portVersion
|
|
devel:libecpg$secondaryArchSuffix = $portVersion
|
|
devel:libpgport_shlib$secondaryArchSuffix = $portVersion
|
|
devel:libpgfeutils$secondaryArchSuffix = $portVersion
|
|
devel:libpgtypes$secondaryArchSuffix = $portVersion
|
|
devel:libpq$secondaryArchSuffix = $portVersion
|
|
devel:libecpg_compat$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES_devel="
|
|
postgresql12${secondaryArchSuffix} == $portVersion base
|
|
"
|
|
|
|
CONFLICTS_server="
|
|
postgresql
|
|
postgresql$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
devel:libcrypto$secondaryArchSuffix
|
|
devel:libicudata$secondaryArchSuffix >= 66
|
|
devel:libicui18n$secondaryArchSuffix >= 66
|
|
devel:libicuuc$secondaryArchSuffix >= 66
|
|
devel:libldap$secondaryArchSuffix
|
|
devel:libpam$secondaryArchSuffix
|
|
devel:libreadline$secondaryArchSuffix
|
|
devel:libssl$secondaryArchSuffix
|
|
devel:libxml2$secondaryArchSuffix
|
|
devel:libxslt$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
cmd:aclocal
|
|
cmd:autoconf
|
|
cmd:automake
|
|
cmd:autoheader
|
|
cmd:awk
|
|
cmd:bison
|
|
cmd:flex
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:libtoolize$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:m4
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:touch
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
libtoolize --force --copy --install
|
|
autoreconf -i
|
|
|
|
touch src/template/haiku # AFAIK it should be empty
|
|
touch config/missing # shouldn't be required
|
|
|
|
CFLAGS=-D_BSD_SOURCE runConfigure ./configure \
|
|
--with-icu \
|
|
--with-ldap \
|
|
--with-libxml \
|
|
--with-libxslt \
|
|
--with-openssl \
|
|
--with-pam \
|
|
--with-template=haiku
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make install
|
|
|
|
prepareInstalledDevelLibs libpgport \
|
|
libpgcommon \
|
|
libpgcommon_shlib \
|
|
libpgport_shlib \
|
|
libecpg \
|
|
libpgtypes \
|
|
libpq \
|
|
libecpg_compat \
|
|
libpgfeutils
|
|
fixPkgconfig
|
|
|
|
mkdir -p $developLibDir/postgresql/pgxs
|
|
mv $libDir/postgresql/pgxs $developLibDir/postgresql/
|
|
|
|
# we want to keep the psql command in the base package
|
|
mv $binDir/psql psql_tmp
|
|
|
|
# all other commands go in the server package
|
|
packageEntries server \
|
|
$binDir \
|
|
$dataDir/postgresql \
|
|
$libDir/postgresql
|
|
|
|
mkdir -p $binDir
|
|
mv psql_tmp $binDir/psql
|
|
|
|
packageEntries devel \
|
|
$developDir
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
LIBRARY_PATH="$sourceDir/tmp_install/packages/postgresql-$portVersion-$REVISION/.self/lib${LIBRARY_PATH:+:$LIBRARY_PATH}"
|
|
make check
|
|
}
|