summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2010-08-23 19:48:31 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2010-08-23 19:48:31 +0000
commite67ecbef6bf3be83b76e717128dc718de7ac00a5 (patch)
tree7960f9510cb5a1f39902795079a5c655c741ea80 /sci-chemistry/gperiodic
parentamd64/x86 stable, bug #334061 (diff)
downloadgentoo-2-e67ecbef6bf3be83b76e717128dc718de7ac00a5.tar.gz
gentoo-2-e67ecbef6bf3be83b76e717128dc718de7ac00a5.tar.bz2
gentoo-2-e67ecbef6bf3be83b76e717128dc718de7ac00a5.zip
Simplify ebuild by patching Makefile, correct nls, fix parallel make. Remove old version using built_with_use.
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/gperiodic')
-rw-r--r--sci-chemistry/gperiodic/ChangeLog10
-rw-r--r--sci-chemistry/gperiodic/files/gperiodic-2.0.10-makefile.patch63
-rw-r--r--sci-chemistry/gperiodic/gperiodic-2.0.10-r1.ebuild59
-rw-r--r--sci-chemistry/gperiodic/gperiodic-2.0.10-r2.ebuild38
-rw-r--r--sci-chemistry/gperiodic/gperiodic-2.0.7.ebuild64
5 files changed, 110 insertions, 124 deletions
diff --git a/sci-chemistry/gperiodic/ChangeLog b/sci-chemistry/gperiodic/ChangeLog
index 9440ce57dcef..4f3e923c0234 100644
--- a/sci-chemistry/gperiodic/ChangeLog
+++ b/sci-chemistry/gperiodic/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sci-chemistry/gperiodic
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gperiodic/ChangeLog,v 1.13 2010/08/22 20:01:10 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gperiodic/ChangeLog,v 1.14 2010/08/23 19:48:31 xarthisius Exp $
+
+*gperiodic-2.0.10-r2 (23 Aug 2010)
+
+ 23 Aug 2010; Kacper Kowalik <xarthisius@gentoo.org>
+ -gperiodic-2.0.7.ebuild, -gperiodic-2.0.10-r1.ebuild,
+ +gperiodic-2.0.10-r2.ebuild, +files/gperiodic-2.0.10-makefile.patch:
+ Simplify ebuild by patching Makefile, correct nls, fix parallel make.
+ Remove old version using built_with_use.
*gperiodic-2.0.10-r1 (22 Aug 2010)
diff --git a/sci-chemistry/gperiodic/files/gperiodic-2.0.10-makefile.patch b/sci-chemistry/gperiodic/files/gperiodic-2.0.10-makefile.patch
new file mode 100644
index 000000000000..694e894c2438
--- /dev/null
+++ b/sci-chemistry/gperiodic/files/gperiodic-2.0.10-makefile.patch
@@ -0,0 +1,63 @@
+Respect CC, CFLAGS, LDFLAGS
+Fix install paths
+Fix parallel build
+
+--- Makefile
++++ Makefile
+@@ -1,6 +1,5 @@
+-CC := gcc
+-CFLAGS := `pkg-config --cflags gtk+-2.0` -I. -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
+-LIBS :=`pkg-config --libs gtk+-2.0`
++CFLAGS += `pkg-config --cflags gtk+-2.0` -I. -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
++LIBS +=`pkg-config --libs gtk+-2.0`
+ bindir ?= /usr/bin
+ datadir ?= /usr/share
+ enable_nls ?= 1
+@@ -8,12 +7,11 @@
+ .c.o:
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) $<
+
+-all:
+- make gperiodic
+- make -C po/ all enable_nls=$(enable_nls)
++all: gperiodic
++ $(MAKE) -C po/ all enable_nls=$(enable_nls)
+
+ gperiodic: gperiodic.o
+- $(CC) $(CFLAGS) -o gperiodic gperiodic.o $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o gperiodic gperiodic.o $(LIBS)
+ ifeq ($(strip),1)
+ strip gperiodic
+ endif
+@@ -23,24 +21,21 @@
+ gperiodic.o: gperiodic.c gperiodic.h table_data.h
+
+ install:
+- mkdir -p $(DESTDIR)$(bindir)
+- install -m 755 gperiodic $(DESTDIR)$(bindir)
+- mkdir -p $(DESTDIR)$(datadir)/applications
+- install -m 644 gperiodic.desktop $(DESTDIR)$(datadir)/applications
+- mkdir -p $(DESTDIR)$(datadir)/pixmaps
+- install -m 644 gperiodic.png $(DESTDIR)$(datadir)/pixmaps
+- install -m 644 gperiodic-crystal.png $(DESTDIR)$(datadir)/pixmaps
+- make -C po/ install enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR)
++ install -D -m 755 gperiodic $(DESTDIR)$(bindir)/gperiodic
++ install -D -m 644 gperiodic.desktop $(DESTDIR)$(datadir)/applications/gperiodic.desktop
++ install -D -m 644 gperiodic.png $(DESTDIR)$(datadir)/pixmaps/gperiodic.png
++ install -m 644 gperiodic-crystal.png $(DESTDIR)$(datadir)/pixmaps/gperiodic-crystal.png
++ $(MAKE) -C po/ install enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR)
+
+ uninstall:
+ rm -f $(bindir)/gperiodic \
+ $(datadir)/applications/gperiodic.desktop
+ $(datadir)/pixmaps/gperiodic.png \
+ $(datadir)/pixmaps/gperiodic-crystal.png
+- make -C po/ uninstall enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR)
++ $(MAKE) -C po/ uninstall enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR)
+
+ clean:
+ rm -f *.o gperiodic
+- make -C po/ clean
++ $(MAKE) -C po/ clean
+
+ .PHONY: install uninstall clean
diff --git a/sci-chemistry/gperiodic/gperiodic-2.0.10-r1.ebuild b/sci-chemistry/gperiodic/gperiodic-2.0.10-r1.ebuild
deleted file mode 100644
index 8cecda1924f0..000000000000
--- a/sci-chemistry/gperiodic/gperiodic-2.0.10-r1.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gperiodic/gperiodic-2.0.10-r1.ebuild,v 1.1 2010/08/22 20:01:11 hwoarang Exp $
-
-EAPI="2"
-
-inherit toolchain-funcs eutils
-
-DESCRIPTION="Periodic table application for Linux"
-SRC_URI="http://www.frantz.fi/software/${P}.tar.gz"
-HOMEPAGE="http://www.frantz.fi/software/gperiodic.php"
-
-KEYWORDS="~amd64 ~x86"
-SLOT="0"
-LICENSE="GPL-2"
-IUSE="nls"
-
-RDEPEND=">=sys-libs/ncurses-5.2
- =x11-libs/gtk+-2*
- x11-libs/cairo[X]
- nls? ( sys-devel/gettext )"
-
-DEPEND="${RDEPEND}
- dev-util/pkgconfig"
-
-src_prepare() {
- sed -i -e "s|-DGTK_DISABLE_DEPRECATED|${CFLAGS}|" \
- -e "/make clean/d" -e "/^CC/s:^.*$:CC=$(tc-getCC):" \
- -e "s:\$(CFLAGS):& \${LDFLAGS}:" \
- Makefile || die
-
- if ! use nls; then
- sed -i -e "/make -C po/d" Makefile || die
- fi
- sed -i -e "s|/usr/bin|${D}/usr/bin|" \
- -e "s|/usr/share|${D}/usr/share|" Makefile || die
- sed -i -e "s|/usr/share|${D}/usr/share|" po/Makefile || die
-}
-
-src_install() {
- # Create directories - Makefile is quite broken.
- dodir /usr/bin
- dodir /usr/share/pixmaps
- dodir /usr/share/applications
-
- emake install || die "make install failed."
-
- # Fix permissions
- chmod 644 "${D}/usr/share/pixmaps/*"
- chmod 644 "${D}/usr/share/applications/*"
-
- # Fix the chemistry category in the .desktop file, bug 97202.
- sed -i -e "s|Chemestry|Chemistry|" "${D}/usr/share/applications/gperiodic.desktop"
-
- # The man page seems to have been removed too.
-# doman man/gperiodic.1
- dodoc AUTHORS ChangeLog README NEWS || die
- newdoc po/README README.translation || die
-}
diff --git a/sci-chemistry/gperiodic/gperiodic-2.0.10-r2.ebuild b/sci-chemistry/gperiodic/gperiodic-2.0.10-r2.ebuild
new file mode 100644
index 000000000000..c9b219e0592b
--- /dev/null
+++ b/sci-chemistry/gperiodic/gperiodic-2.0.10-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gperiodic/gperiodic-2.0.10-r2.ebuild,v 1.1 2010/08/23 19:48:31 xarthisius Exp $
+
+EAPI="2"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Periodic table application for Linux"
+SRC_URI="http://www.frantz.fi/software/${P}.tar.gz"
+HOMEPAGE="http://www.frantz.fi/software/gperiodic.php"
+
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE="nls"
+
+RDEPEND=">=sys-libs/ncurses-5.2
+ x11-libs/gtk+:2
+ x11-libs/cairo[X]
+ nls? ( sys-devel/gettext )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+src_prepare() {
+ use nls && myopts="enable_nls=1" || myopts="enable_nls=0"
+ epatch "${FILESDIR}"/${P}-makefile.patch
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) ${myopts} || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" ${myopts} install || die
+ dodoc AUTHORS ChangeLog README NEWS || die
+}
diff --git a/sci-chemistry/gperiodic/gperiodic-2.0.7.ebuild b/sci-chemistry/gperiodic/gperiodic-2.0.7.ebuild
deleted file mode 100644
index f0cbfcb3f0cc..000000000000
--- a/sci-chemistry/gperiodic/gperiodic-2.0.7.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gperiodic/gperiodic-2.0.7.ebuild,v 1.8 2008/05/29 19:59:40 markusle Exp $
-
-inherit toolchain-funcs eutils
-
-DESCRIPTION="Periodic table application for Linux"
-SRC_URI="mirror://gentoo/${P}.tar.gz"
-HOMEPAGE="http://www.frantz.fi/software/gperiodic.php"
-
-KEYWORDS="x86 amd64"
-SLOT="0"
-LICENSE="GPL-2"
-IUSE="nls"
-
-RDEPEND=">=sys-libs/ncurses-5.2
- =x11-libs/gtk+-2*
- nls? ( sys-devel/gettext )"
-
-DEPEND="${RDEPEND}
- dev-util/pkgconfig"
-
-pkg_setup() {
- if ! built_with_use x11-libs/cairo X; then
- die "gperiodic needs x11-libs/cairo emerged with USE=\"X\""
- fi
-}
-
-src_compile() {
- # The author has removed "unnecessary automake/autoconf setup"
-
- sed -i -e "s|-DGTK_DISABLE_DEPRECATED|${CFLAGS}|" Makefile
- sed -i -e "/make clean/d" Makefile
- sed -i -e "s|CC=gcc|CC=$(tc-getCC)|" Makefile
- if ! use nls; then
- sed -i -e "/make -C po/d" Makefile
- fi
- emake || die "emake failed!"
-}
-
-src_install() {
- sed -i -e "s|/usr/bin|${D}/usr/bin|" Makefile
- sed -i -e "s|/usr/share|${D}/usr/share|" Makefile
- sed -i -e "s|/usr/share|${D}/usr/share|" po/Makefile
-
- # Create directories - Makefile is quite broken.
- dodir /usr/bin
- dodir /usr/share/pixmaps
- dodir /usr/share/applications
-
- make install || die "make install failed."
-
- # Fix permissions
- chmod 644 "${D}/usr/share/pixmaps/*"
- chmod 644 "${D}/usr/share/applications/*"
-
- # Fix the chemistry category in the .desktop file, bug 97202.
- sed -i -e "s|Chemestry|Chemistry|" "${D}/usr/share/applications/gperiodic.desktop"
-
- # The man page seems to have been removed too.
-# doman man/gperiodic.1
- dodoc AUTHORS ChangeLog README NEWS
- newdoc po/README README.translation
-}