summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2006-03-28 22:14:46 +0200
committerBertrand Jacquin <beber@meleeweb.net>2006-03-28 22:14:46 +0200
commita91b829403a45594cd40c305ceb81053af6fef7d (patch)
treef2c8f372ec0e55e1619e6c04ad10fcbbceec234d
parentelitaire: Oops, was a bz2 (diff)
downloadportage-a91b829403a45594cd40c305ceb81053af6fef7d.tar.xz
Add a codeworker ebuild
-rw-r--r--dev-util/codeworker/Manifest6
-rw-r--r--dev-util/codeworker/codeworker-4.1.1.ebuild109
-rw-r--r--dev-util/codeworker/files/digest-codeworker-4.1.13
3 files changed, 118 insertions, 0 deletions
diff --git a/dev-util/codeworker/Manifest b/dev-util/codeworker/Manifest
new file mode 100644
index 00000000..d16f309f
--- /dev/null
+++ b/dev-util/codeworker/Manifest
@@ -0,0 +1,6 @@
+MD5 954351fac78f00b6ad031c794ca00c58 codeworker-4.1.1.ebuild 2897
+RMD160 6464a40bb43735e73f3e54ae8eb93cd8b4ed5dca codeworker-4.1.1.ebuild 2897
+SHA256 77583a1f5139658eac9a707ce6c61d1d9658f953db5fa5348707e697edc31916 codeworker-4.1.1.ebuild 2897
+MD5 54e035c17f15a8a2474b4df84d0ce732 files/digest-codeworker-4.1.1 253
+RMD160 2d30f8d1d8c580eade6446f9357dcc656e2dae04 files/digest-codeworker-4.1.1 253
+SHA256 57090aedd6f35a12e3f10af91d8aee22fe473bc56a2418c5e08f75f0e88fa825 files/digest-codeworker-4.1.1 253
diff --git a/dev-util/codeworker/codeworker-4.1.1.ebuild b/dev-util/codeworker/codeworker-4.1.1.ebuild
new file mode 100644
index 00000000..62d48789
--- /dev/null
+++ b/dev-util/codeworker/codeworker-4.1.1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+DESCRIPTION="Versatile parsing tool and source code generator"
+HOMEPAGE="http://codeworker.free.fr/"
+SRC_URI="http://codeworker.free.fr/downloads/CodeWorker_SRC4_1_1.zip"
+
+LICENSE="LGPL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="curl debug doc examples readline static"
+RESTRICT="nomirror"
+
+DEPEND="app-arch/unzip
+ curl? ( >=net-misc/curl-7.10.5 )
+ debug? ( sys-devel/gdb )
+ doc? ( app-text/tetex )
+ readline? ( sys-libs/readline )"
+RDEPEND=""
+
+S="${WORKDIR}/CodeWorker4_1_1"
+
+src_unpack()
+{
+ unpack ${A}
+
+ # Convert Makefile to Unix
+ sed -i -e 's/.$//' ${S}/Makefile
+
+ # Remove -g if not in debug mode
+ if ! use debug; then
+ sed -i -re "s/^CXXFLAGS(.*)-g(.*)/CXXFLAGS\1\2/" ${S}/Makefile
+ sed -i -re "s/^LFLAGS(.*)-g(.*)/LFLAGS\1\2/" ${S}/Makefile
+ fi
+
+ # Remove -ldl if not Linux
+ if [ "$(uname -o)" != "GNU/Linux" ]; then
+ sed -i -re 's/^LFLAGS(.*)-ldl(.*)/LFLAGS\1\2/' ${S}/Makefile
+ fi
+
+ if use curl; then
+ local new_cc="$(grep -E '^CC' ${S}/Makefile) -DCODEWORKER_CURL_LIB"
+ local new_lflags="$(grep -E '^LFLAGS' ${S}/Makefile) $(curl-config --libs)"
+ sed -i -re "s;^CC(.*);${new_cc};" ${S}/Makefile
+ sed -i -re "s;^LFLAGS(.*);${new_lflags};" ${S}/Makefile
+ fi
+
+ if use readline; then
+ local new_cc="$(grep -E '^CC' ${S}/Makefile) -DCODEWORKER_GNU_READLINE"
+ local new_lflags="$(grep -E '^LFLAGS' ${S}/Makefile) -lreadline -lcurses"
+ sed -i -re "s;^CC(.*);${new_cc};" ${S}/Makefile
+ sed -i -re "s;^LFLAGS(.*);${new_lflags};" ${S}/Makefile
+ fi
+
+ # Compile with -fPIC if you want to do a shared lib
+ # And add static lib creation with shared lib creation
+ if ! use static; then
+ sed -i -re 's;^CXXFLAGS(.*);CXXFLAGS\1 -fPIC;' ${S}/Makefile
+ sed -i -re 's;(.*)ar -r(.*);\t$(CC) -o libcodeworker.so -shared $(OBJECTS);' ${S}/Makefile
+ fi
+}
+
+src_compile()
+{
+ make || die "emake failed"
+
+ if use doc; then
+ cd Documentation
+ einfo "latex CodeWorker.tex"
+ latex CodeWorker.tex > /dev/null
+ einfo "makeindex CodeWorker.idx"
+ makeindex CodeWorker.idx > /dev/null
+ einfo "latex CodeWorker.tex"
+ latex CodeWorker.tex > /dev/null
+ einfo "latex CodeWorker.tex"
+ latex CodeWorker.tex > /dev/null
+ einfo "dvipdfm -o CodeWorker.pdf CodeWorker"
+ dvipdfm -o CodeWorker.pdf CodeWorker > /dev/null
+ cd ..
+ fi
+}
+
+src_install()
+{
+ dodir /usr/bin
+ dodir /usr/lib
+
+ cp ${S}/codeworker ${D}/usr/bin
+
+ if use static; then
+ cp ${S}/libcodeworker.a ${D}/usr/lib
+ else
+ cp ${S}/libcodeworker.so ${D}/usr/lib
+ fi
+
+ if use doc; then
+ dodir /usr/share/codeworker/doc
+ cp ${S}/Documentation/CodeWorker.pdf ${D}/usr/share/codeworker/doc
+ cp -r ${S}/WebSite ${S}/Scripts/Tutorial ${D}/usr/share/codeworker/doc
+ fi
+
+ if use examples; then
+ dodir /usr/share/codeworker/examples
+ cp -r ${S}/java ${S}/cs ${S}/Generation ${D}/usr/share/codeworker/examples
+ fi
+
+ dodoc readme.txt
+}
diff --git a/dev-util/codeworker/files/digest-codeworker-4.1.1 b/dev-util/codeworker/files/digest-codeworker-4.1.1
new file mode 100644
index 00000000..028fc366
--- /dev/null
+++ b/dev-util/codeworker/files/digest-codeworker-4.1.1
@@ -0,0 +1,3 @@
+MD5 836eb1f01ddd26b86b11f4eecbfdaa2e CodeWorker_SRC4_1_1.zip 3035271
+RMD160 fb64b71e98f38cbdba32c4f33317faf81c985ea2 CodeWorker_SRC4_1_1.zip 3035271
+SHA256 5a8d8556b26fa35f6d4823299d7b7f03d092b5b8e67b9f029b6d37b09f3fdd71 CodeWorker_SRC4_1_1.zip 3035271