summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/astyle')
-rw-r--r--dev-util/astyle/Manifest3
-rw-r--r--dev-util/astyle/astyle-2.02.1.ebuild71
-rw-r--r--dev-util/astyle/astyle-2.03.ebuild71
-rw-r--r--dev-util/astyle/astyle-2.04.ebuild67
-rw-r--r--dev-util/astyle/files/astyle-2.02.1-build_system.patch54
-rw-r--r--dev-util/astyle/metadata.xml36
6 files changed, 302 insertions, 0 deletions
diff --git a/dev-util/astyle/Manifest b/dev-util/astyle/Manifest
new file mode 100644
index 000000000000..6701525c12bc
--- /dev/null
+++ b/dev-util/astyle/Manifest
@@ -0,0 +1,3 @@
+DIST astyle_2.02.1_linux.tar.gz 153253 SHA256 0bece9a32887e51f42c57617cf7c4f9b63d0a386749fe3a094f5525b639ef953 SHA512 5a156910a2610b1c49bfe78ac237e1bb13e9627912db107ef98fead88a29f000ed355446c033fd052112d54a4f2bbdf3f484ef58b9976c311c06cde951fda274 WHIRLPOOL 96451afd3f4bb6eaa51f33b2f565e545f401973a00ef6653ee4dbeff85ca7c06928e12d54249a8221e881c20f4d1bdea023fbe04ac57631601e15a3453dc2b79
+DIST astyle_2.03_linux.tar.gz 142577 SHA256 22b5249a0b8c9fab3b3bcd467abcb3c6b4a78458b528028634a83dca4c6ca389 SHA512 5f23ef010edba0ddd7377b2a6023a0d97e22f7247e20a0c94d56252fef55b6de291b3c9de67f5ddfa02906cd44470e136ae49e38f7bd2afe65a204245230a579 WHIRLPOOL b97a212dd4c92e24af9c5aa99fafcc5de929e94a81e160244d9cbc66bc7b97e0ca415e21b8e1eae35ef659b42423e1dd9b154fbddf36fef7fc344deca39dc156
+DIST astyle_2.04_linux.tar.gz 156974 SHA256 70b37f4853c418d1e2632612967eebf1bdb93dfbe558c51d7d013c9b4e116b60 SHA512 bc0f6351fac4198ab969251342c4e453064b07512a2d06825a93c75daf86b06469c9971f35fbadad872d23368dc546019d8d174e07ceaad6e10007f562fdeffd WHIRLPOOL d9aa3f537885e373d791204652ed5c8d5231be0840ef5dde3714bb8c9c524e327585a51b7b14da1aae2952f7c9248401bc2769290bc5828d15f030f41d95c1fe
diff --git a/dev-util/astyle/astyle-2.02.1.ebuild b/dev-util/astyle/astyle-2.02.1.ebuild
new file mode 100644
index 000000000000..66bf3afacb91
--- /dev/null
+++ b/dev-util/astyle/astyle-2.02.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils java-pkg-opt-2 multilib toolchain-funcs
+
+DESCRIPTION="Artistic Style is a reindenter and reformatter of C++, C and Java source code"
+HOMEPAGE="http://astyle.sourceforge.net/"
+SRC_URI="mirror://sourceforge/astyle/astyle_${PV}_linux.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+IUSE="doc java static-libs"
+
+DEPEND="app-arch/xz-utils
+ java? ( >=virtual/jdk-1.6 )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+ tc-export CXX
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-build_system.patch
+ java-pkg-opt-2_src_prepare
+ sed -e "s:^\(JAVAINCS\s*\)=.*$:\1= $(java-pkg_get-jni-cflags):" \
+ -e "s:ar crs:$(tc-getAR) crs:" \
+ -i build/gcc/Makefile || die
+}
+
+src_compile() {
+ local mk_opts="-f ../build/gcc/Makefile -C src"
+ emake ${mk_opts} ${PN}
+ emake ${mk_opts} shared
+ if use java ; then
+ emake ${mk_opts} java
+ fi
+ if use static-libs ; then
+ emake ${mk_opts} static
+ fi
+}
+
+src_install() {
+ insinto /usr/include
+ doins src/${PN}.h
+
+ pushd src/bin &> /dev/null
+ dobin ${PN}
+
+ dolib.so lib${PN}.so.0.0.0
+ dosym lib${PN}.so.0.0.0 /usr/$(get_libdir)/lib${PN}.so.0
+ dosym lib${PN}.so.0.0.0 /usr/$(get_libdir)/lib${PN}.so
+ if use java ; then
+ dolib.so lib${PN}j.so.0.0.0
+ dosym lib${PN}j.so.0.0.0 /usr/$(get_libdir)/lib${PN}j.so.0
+ dosym lib${PN}j.so.0.0.0 /usr/$(get_libdir)/lib${PN}j.so
+ fi
+ if use static-libs ; then
+ dolib lib${PN}.a
+ fi
+ popd &> /dev/null
+
+ use doc && dohtml doc/*
+}
diff --git a/dev-util/astyle/astyle-2.03.ebuild b/dev-util/astyle/astyle-2.03.ebuild
new file mode 100644
index 000000000000..a29b39744a42
--- /dev/null
+++ b/dev-util/astyle/astyle-2.03.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils java-pkg-opt-2 multilib toolchain-funcs
+
+DESCRIPTION="Artistic Style is a reindenter and reformatter of C++, C and Java source code"
+HOMEPAGE="http://astyle.sourceforge.net/"
+SRC_URI="mirror://sourceforge/astyle/astyle_${PV}_linux.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+IUSE="doc java static-libs"
+
+DEPEND="app-arch/xz-utils
+ java? ( >=virtual/jdk-1.6 )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+ tc-export CXX
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.02.1-build_system.patch
+ java-pkg-opt-2_src_prepare
+ sed -e "s:^\(JAVAINCS\s*\)=.*$:\1= $(java-pkg_get-jni-cflags):" \
+ -e "s:ar crs:$(tc-getAR) crs:" \
+ -i build/gcc/Makefile || die
+}
+
+src_compile() {
+ local mk_opts="-f ../build/gcc/Makefile -C src"
+ emake ${mk_opts} ${PN}
+ emake ${mk_opts} shared
+ if use java ; then
+ emake ${mk_opts} java
+ fi
+ if use static-libs ; then
+ emake ${mk_opts} static
+ fi
+}
+
+src_install() {
+ insinto /usr/include
+ doins src/${PN}.h
+
+ pushd src/bin &> /dev/null
+ dobin ${PN}
+
+ dolib.so lib${PN}.so.0.0.0
+ dosym lib${PN}.so.0.0.0 /usr/$(get_libdir)/lib${PN}.so.0
+ dosym lib${PN}.so.0.0.0 /usr/$(get_libdir)/lib${PN}.so
+ if use java ; then
+ dolib.so lib${PN}j.so.0.0.0
+ dosym lib${PN}j.so.0.0.0 /usr/$(get_libdir)/lib${PN}j.so.0
+ dosym lib${PN}j.so.0.0.0 /usr/$(get_libdir)/lib${PN}j.so
+ fi
+ if use static-libs ; then
+ dolib lib${PN}.a
+ fi
+ popd &> /dev/null
+
+ use doc && dohtml doc/*
+}
diff --git a/dev-util/astyle/astyle-2.04.ebuild b/dev-util/astyle/astyle-2.04.ebuild
new file mode 100644
index 000000000000..71a7e6c0104c
--- /dev/null
+++ b/dev-util/astyle/astyle-2.04.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils java-pkg-opt-2 multilib toolchain-funcs
+
+DESCRIPTION="Artistic Style is a reindenter and reformatter of C++, C and Java source code"
+HOMEPAGE="http://astyle.sourceforge.net/"
+SRC_URI="mirror://sourceforge/astyle/astyle_${PV}_linux.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+IUSE="doc java static-libs"
+
+DEPEND="app-arch/xz-utils
+ java? ( >=virtual/jdk-1.6 )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+ tc-export CXX
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.02.1-build_system.patch
+ java-pkg-opt-2_src_prepare
+ sed -e "s:^\(JAVAINCS\s*\)=.*$:\1= $(java-pkg_get-jni-cflags):" \
+ -e "s:ar crs:$(tc-getAR) crs:" \
+ -i build/gcc/Makefile || die
+}
+
+src_compile() {
+ emake -f ../build/gcc/Makefile -C src \
+ ${PN} \
+ shared \
+ $(usex java java '') \
+ $(usex static-libs static '')
+}
+
+src_install() {
+ insinto /usr/include
+ doins src/${PN}.h
+
+ pushd src/bin &> /dev/null
+ dobin ${PN}
+
+ dolib.so lib${PN}.so.0.0.0
+ dosym lib${PN}.so.0.0.0 /usr/$(get_libdir)/lib${PN}.so.0
+ dosym lib${PN}.so.0.0.0 /usr/$(get_libdir)/lib${PN}.so
+ if use java ; then
+ dolib.so lib${PN}j.so.0.0.0
+ dosym lib${PN}j.so.0.0.0 /usr/$(get_libdir)/lib${PN}j.so.0
+ dosym lib${PN}j.so.0.0.0 /usr/$(get_libdir)/lib${PN}j.so
+ fi
+ if use static-libs ; then
+ dolib lib${PN}.a
+ fi
+ popd &> /dev/null
+
+ use doc && dohtml doc/*
+}
diff --git a/dev-util/astyle/files/astyle-2.02.1-build_system.patch b/dev-util/astyle/files/astyle-2.02.1-build_system.patch
new file mode 100644
index 000000000000..1d63a512e9bc
--- /dev/null
+++ b/dev-util/astyle/files/astyle-2.02.1-build_system.patch
@@ -0,0 +1,54 @@
+--- a/build/gcc/Makefile
++++ b/build/gcc/Makefile
+@@ -34,25 +34,25 @@
+ ipath=$(prefix)/bin
+ CBASEFLAGS = -W -Wall -fno-rtti -fno-exceptions
+ JAVAINCS = -I$(JAVA_HOME)/include
+-CXX = g++
++CXX ?= g++
+ INSTALL=install -o $(USER) -g $(USER)
+
+ ##################################################
+
+ # define compile options for each build
+-ifdef CFLAGS
+- CFLAGSr = -DNDEBUG $(CBASEFLAGS) $(CFLAGS)
+- CFLAGSd = -g $(CBASEFLAGS) $(CFLAGS)
++ifdef CXXFLAGS
++ CFLAGSr = -DNDEBUG $(CBASEFLAGS) $(CXXFLAGS)
++ CFLAGSd = -g $(CBASEFLAGS) $(CXXFLAGS)
+ else
+ CFLAGSr = -DNDEBUG -O3 $(CBASEFLAGS)
+ CFLAGSd = -g $(CBASEFLAGS)
+ endif
+-CFLAGSs = -DASTYLE_LIB -fpic $(CFLAGSr)
+-CFLAGSsd = -DASTYLE_LIB -fpic $(CFLAGSd)
++CFLAGSs = -DASTYLE_LIB -fPIC $(CFLAGSr)
++CFLAGSsd = -DASTYLE_LIB -fPIC $(CFLAGSd)
+ CFLAGSa = -DASTYLE_LIB $(CFLAGSr)
+ CFLAGSad = -DASTYLE_LIB $(CFLAGSd)
+-CFLAGSsj = -DASTYLE_JNI -fpic $(CFLAGSr) $(JAVAINCS)
+-CFLAGSsjd = -DASTYLE_JNI -fpic $(CFLAGSd) $(JAVAINCS)
++CFLAGSsj = -DASTYLE_JNI -fPIC $(CFLAGSr) $(JAVAINCS)
++CFLAGSsjd = -DASTYLE_JNI -fPIC $(CFLAGSd) $(JAVAINCS)
+
+ # define link options
+ ifdef LDFLAGS
+@@ -134,7 +134,7 @@
+ shared: libastyle.so
+ libastyle.so: $(OBJs)
+ @ mkdir -p $(bindir)
+- $(CXX) -shared $(LDFLAGSr) -o $(bindir)/$@ $^
++ $(CXX) -shared -Wl,-soname,$@.0 $(LDFLAGSr) -o $(bindir)/$@.0.0.0 $^
+ @ echo
+
+ shareddebug: libastyled.so
+@@ -158,7 +158,7 @@
+ java: libastylej.so
+ libastylej.so: $(OBJsj)
+ @ mkdir -p $(bindir)
+- $(CXX) -shared $(LDFLAGSr) -o $(bindir)/$@ $^
++ $(CXX) -shared -Wl,-soname,$@.0 $(LDFLAGSr) -o $(bindir)/$@.0.0.0 $^
+ @ echo
+
+ javadebug: libastylejd.so
diff --git a/dev-util/astyle/metadata.xml b/dev-util/astyle/metadata.xml
new file mode 100644
index 000000000000..3ed3c4b22b24
--- /dev/null
+++ b/dev-util/astyle/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dev-tools</herd>
+ <longdescription>
+ From the web page:
+
+ Artistic Style is a reindenter and reformatter of C++, C and Java source
+ code.
+
+ When indenting source code, we as programmers have a tendency to use both
+ spaces and tab characters to create the wanted indentation. Moreover, some
+ editors by default insert spaces instead of tabs when pressing the tab key,
+ and other editors (Emacs for example) have the ability to "pretty up" lines
+ by automatically setting up the white space before the code on the line,
+ possibly inserting spaces in a code that up to now used only tabs for
+ indentation.
+
+ Since the NUMBER of space characters showed on screen for each tab character
+ in the source code changes between editors (until the user sets up the
+ number to his liking...), one of the standard problems facing programmers
+ when moving from one source code editor to another is that code containing
+ both spaces and tabs that was up to now perfectly indented, suddenly becomes
+ a mess to look at when changing to another editor. Even if you as a
+ programmer take care to ONLY use spaces or tabs, looking at other peoples
+ source code can still be problematic.
+
+ To address this problem I have created Artistic Style - a series of filters,
+ written in C++, that automatically reindent &amp; reformat C/C++/Java source
+ files. These can be used from a command line, or it can be incorporated as
+ classes in another C++ program.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">astyle</remote-id>
+ </upstream>
+</pkgmetadata>