From 1c87a0139197a0e7836a2f87a082bb833684dfea Mon Sep 17 00:00:00 2001 From: Steve Prybylski Date: Sun, 20 Dec 2015 19:05:21 -0500 Subject: [PATCH] galculator-gtk3: integrate galculator-gtk2 as subpkg. --- srcpkgs/galculator-gtk2 | 1 + srcpkgs/galculator-gtk2/template | 18 -------------- srcpkgs/galculator-gtk3/template | 42 +++++++++++++++++++++++++++++--- 3 files changed, 39 insertions(+), 22 deletions(-) create mode 120000 srcpkgs/galculator-gtk2 delete mode 100644 srcpkgs/galculator-gtk2/template diff --git a/srcpkgs/galculator-gtk2 b/srcpkgs/galculator-gtk2 new file mode 120000 index 00000000000..cea44957486 --- /dev/null +++ b/srcpkgs/galculator-gtk2 @@ -0,0 +1 @@ +galculator-gtk3 \ No newline at end of file diff --git a/srcpkgs/galculator-gtk2/template b/srcpkgs/galculator-gtk2/template deleted file mode 100644 index 5410a7a30ef..00000000000 --- a/srcpkgs/galculator-gtk2/template +++ /dev/null @@ -1,18 +0,0 @@ -# Template file for 'galculator' - -pkgname="galculator-gtk2" -version="2.1.3" -revision=2 -wrksrc="${pkgname%-*}-${version}" -build_style=gnu-configure -configure_args="--disable-gtk3" -depends="gtk-update-icon-cache" -makedepends="gtk+-devel" -hostmakedepends="intltool pkg-config" -conflicts="galculator-gtk3>=0" -short_desc="GTK+ based scientific calculator" -maintainer="Aaditya Bagga " -license="GPL-2" -homepage="galculator.sourceforge.net" -distfiles="${SOURCEFORGE_SITE}/${pkgname%-*}/${pkgname%-*}-${version}.tar.bz2" -checksum="91ac62d6d74da910cb79c68f7bf3f4505ac0efe51091150c4ea54fe1c1306235" diff --git a/srcpkgs/galculator-gtk3/template b/srcpkgs/galculator-gtk3/template index 47f7fce8e9d..a0bed972b9e 100644 --- a/srcpkgs/galculator-gtk3/template +++ b/srcpkgs/galculator-gtk3/template @@ -5,13 +5,47 @@ version="2.1.3" revision=2 wrksrc="${pkgname%-*}-${version}" build_style=gnu-configure -depends="gtk-update-icon-cache" -makedepends="gtk+3-devel" hostmakedepends="intltool pkg-config" -conflicts="galculator-gtk2>=0" -short_desc="GTK+ based scientific calculator" +makedepends="gtk+-devel gtk+3-devel" +short_desc="GTK+ based scientific calculator (GTK+3)" maintainer="Aaditya Bagga " license="GPL-2" homepage="galculator.sourceforge.net" distfiles="${SOURCEFORGE_SITE}/${pkgname%-*}/${pkgname%-*}-${version}.tar.bz2" checksum="91ac62d6d74da910cb79c68f7bf3f4505ac0efe51091150c4ea54fe1c1306235" + +provides="galculator-${version}_${revision}" +replaces="galculator-gtk2>=0" + +pre_configure() { + mkdir -p gtk2 + mv * gtk2 || true + cp -a gtk2 gtk3 +} + +do_configure() { + # GTK+2 + cd ${wrksrc}/gtk2 + ./configure ${configure_args} --disable-gtk3 + # GTK+3 + cd ${wrksrc}/gtk3 + ./configure ${configure_args} --enable-gtk3 +} + +do_build() { + make ${makejobs} -C gtk2 + make ${makejobs} -C gtk3 +} + +do_install() { + make DESTDIR=${DESTDIR} -C ${wrksrc}/gtk3 install +} + +galculator-gtk2_package() { + short_desc="${short_desc/GTK+3/GTK+2}" + provides="galculator-${version}_${revision}" + replaces="galculator-gtk3>=0" + pkg_install() { + make DESTDIR=${PKGDESTDIR} -C ${wrksrc}/gtk2 install + } +}