From cc3443b41ff688fd44db843d903eb70398ef0e7a Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Fri, 26 Feb 2016 23:50:52 +0100 Subject: [PATCH] dev-db/wxsqlite3: improve, install pkg-config file --- .../wxsqlite3/wxsqlite3-3.3.0.exheres-0 | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/packages/dev-db/wxsqlite3/wxsqlite3-3.3.0.exheres-0 b/packages/dev-db/wxsqlite3/wxsqlite3-3.3.0.exheres-0 index e25c27a..1259d3b 100644 --- a/packages/dev-db/wxsqlite3/wxsqlite3-3.3.0.exheres-0 +++ b/packages/dev-db/wxsqlite3/wxsqlite3-3.3.0.exheres-0 @@ -6,14 +6,16 @@ HOMEPAGE="https://github.com/utelle/wxsqlite3" DOWNLOADS="https://github.com/utelle/wxsqlite3/archive/v${PV}.tar.gz -> ${PNV}.tar.gz" LICENCES="wxWinLL-3" -SLOT="0" +SLOT="3.0" PLATFORMS="~amd64 ~x86" -MYOPTIONS="" +MYOPTIONS=" + ( providers: gtk2 gtk3 ) [[ number-selected = exactly-one ]] +" DEPENDENCIES=" - build+run: - dev-db/sqlite:3 - x11-libs/wxGTK:3.0 + build+run: + dev-db/sqlite:3 + x11-libs/wxGTK:${SLOT}[providers:gtk3?][providers:gtk2?] " DEFAULT_SRC_CONFIGURE_PARAMS=( @@ -24,3 +26,25 @@ DEFAULT_SRC_CONFIGURE_PARAMS=( --with-sqlite3-prefix="/usr/$(exhost --target)" ) +src_install() { + default + + local gtkver + if option providers:gtk3 ; then + gtkver=3 + else + gtkver=2 + fi + + edo sed \ + -e "s:prefix=/usr:prefix=/usr/$(exhost --target):" \ + -e "s:wxcode_gtk2_wxsqlite3:wxcode_gtk${gtkver}_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 +} +