hasufell-repository/packages/dev-db/wxsqlite3/wxsqlite3-3.3.1.exheres-0
Julian Ospald 7a894588e6
dev-db/wxsqlite3: bump to 3.3.1
This also fixes the includedir.
2016-05-14 15:07:49 +02:00

74 lines
1.8 KiB
Bash

# Copyright 2016 Julian Ospald <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2
require autotools [ supported_autoconf=[ 2.5 ] supported_automake=[ 1.15 ] ]
require github [ user=utelle tag=v${PV} ]
SUMMARY="C++ wrapper around the public domain SQLite 3.x database"
LICENCES="wxWinLL-3"
SLOT="3.0"
PLATFORMS="~amd64 ~x86"
MYOPTIONS="
( providers: gtk2 gtk3 ) [[ number-selected = exactly-one ]]
"
DEPENDENCIES="
build:
dev-util/bakefile[~0.2.9]
build+run:
dev-db/sqlite:3[>=3.12.1]
x11-libs/wxGTK:${SLOT}[providers:gtk3?][providers:gtk2?]
"
DEFAULT_SRC_PREPARE_PATCHES=(
"${FILES}"/${PNV}-respect-includedir.patch
)
src_prepare() {
default
edo pushd build
edo bakefile_gen -f autoconf
edo eaclocal
edo eautoconf
edo mv configure ..
edo popd
}
src_configure() {
econf \
--enable-shared \
--enable-unicode \
--with-wx-config="/usr/$(exhost --target)/lib/wx/config/$(option providers:gtk3 'gtk3' 'gtk2')-unicode-3.0" \
--with-wxshared \
--with-sqlite3-prefix="/usr/$(exhost --target)" \
--includedir="/usr/$(exhost --target)/include/wx-${SLOT}/" \
--hates=disable-silent-rules \
--hates=enable-fast-install
}
src_install() {
default
local gtkver
if option providers:gtk3 ; then
gtkver=3
else
gtkver=2
fi
# this is the upstream .pc file
edo sed \
-e "s:prefix=/usr:prefix=/usr/$(exhost --target):" \
-e "s:wxcode_gtk2_wxsqlite3:wxcode_gtk${gtkver}u_wxsqlite3:" \
-e "s:@WXVERSION@:${SLOT}:g" \
-e "s:@LIBDIR@:lib:g" \
-e "s:@VERSION@:${PV}:g" \
${PN}.pc.in > ${PN}.pc
insinto /usr/$(exhost --target)/lib/pkgconfig
doins ${PN}.pc
}