summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Beddek <telans@posteo.de>2022-06-20 18:04:58 +1200
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2022-06-21 11:59:22 +0200
commit7851882d742b5931a488374c1356f8f83b88a408 (patch)
treee8c2e618340e669244e2ea6d825174826a42d9cf /sci-electronics
parentsci-libs/dcmtk: remove unnecessary dep on libjpeg (diff)
downloadgentoo-7851882d742b5931a488374c1356f8f83b88a408.tar.gz
gentoo-7851882d742b5931a488374c1356f8f83b88a408.tar.bz2
gentoo-7851882d742b5931a488374c1356f8f83b88a408.zip
sci-electronics/magic: respect cairo use flag
Also, don't let make/configure try to grab the commit through `git rev-parse HEAD` Signed-off-by: James Beddek <telans@posteo.de> Closes: https://github.com/gentoo/gentoo/pull/25787 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-electronics')
-rw-r--r--sci-electronics/magic/magic-8.3.309-r1.ebuild96
1 files changed, 96 insertions, 0 deletions
diff --git a/sci-electronics/magic/magic-8.3.309-r1.ebuild b/sci-electronics/magic/magic-8.3.309-r1.ebuild
new file mode 100644
index 000000000000..daeca5ef9e93
--- /dev/null
+++ b/sci-electronics/magic/magic-8.3.309-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit python-any-r1
+
+TECH_MOSIS_VER="2002a"
+
+DESCRIPTION="The VLSI design CAD tool"
+HOMEPAGE="http://www.opencircuitdesign.com/magic/index.html"
+SRC_URI="http://www.opencircuitdesign.com/${PN}/archive/${P}.tgz
+ http://opencircuitdesign.com/~tim/programs/${PN}/archive/${TECH_MOSIS_VER}.tar.gz \
+ -> ${PN}-tech-mosis-${TECH_MOSIS_VER}.tar.gz"
+
+LICENSE="HPND GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="cairo debug opengl"
+
+RDEPEND="
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ sys-libs/zlib:=
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ dev-tcltk/blt
+ cairo? ( x11-libs/cairo[opengl?] )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="app-shells/tcsh
+ ${PYTHON_DEPS}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.3.232-libdir.patch
+)
+
+DOCS=( README.md README.Tcl TODO )
+
+src_prepare() {
+ default
+
+ # Don't embed MAGIC_COMMIT
+ sed -i 's/git rev-parse HEAD//' scripts/defs.mak.in || die
+
+ pushd scripts &>/dev/null || die
+ mv configure.in configure.ac || die
+ popd &>/dev/null || die
+
+ # required for >=autoconf-2.70 (bug #775422)
+ local ac_aux_file
+ for ac_aux_file in install-sh config.guess config.sub ; do
+ ln -s scripts/${ac_aux_file} ${ac_aux_file} || die
+ done
+}
+
+src_configure() {
+ # Short-circuit top-level configure script to retain CFLAGS
+ # Fix tcl/tk detection, bug #447868
+ cd scripts || die
+ econf \
+ --with-tcl="/usr/$(get_libdir)" \
+ --with-tk="/usr/$(get_libdir)" \
+ --with-tcllibs="/usr/$(get_libdir)" \
+ --with-tklibs="/usr/$(get_libdir)" \
+ --disable-modular \
+ $(use_enable debug memdebug) \
+ $(use_enable cairo cairo-offscreen) \
+ $(use_with cairo) \
+ $(use_with opengl)
+}
+
+src_install() {
+ # Make does not always install required .tech files with parallel make install
+ emake DESTDIR="${ED}" install -j1
+ einstalldocs
+
+ # Move docs from libdir to docdir and add symlink.
+ mv "${ED}/usr/$(get_libdir)/magic/doc"/* "${ED}/usr/share/doc/${PF}/" || die
+ rmdir "${ED}/usr/$(get_libdir)/magic/doc" || die
+ dosym -r "${EPREFIX}/usr/share/doc/${PF}" "/usr/$(get_libdir)/magic/doc"
+
+ # Move tutorial from libdir to datadir and add symlink.
+ dodir /usr/share/${PN}
+ mv "${ED}/usr/$(get_libdir)/magic/tutorial" "${ED}/usr/share/${PN}/" || die
+ dosym -r "${EPREFIX}/usr/share/${PN}/tutorial" "/usr/$(get_libdir)/magic/tutorial"
+
+ # Install latest MOSIS tech files
+ cp -pPR "${WORKDIR}"/${TECH_MOSIS_VER} "${ED}"/usr/$(get_libdir)/magic/sys/current || die
+}