# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ # Initial ebuild from steven knight , in bug 23207 # Updated by Daniel Westermann-Clark # half-heartedly updated by Colin Macdonald inherit eutils # The upstream tarball uses a different naming convention MY_P=${PN}_v${PV/./_} DESCRIPTION="GLUI is a GLUT-based C++ user interface library" HOMEPAGE="http://www.nigels.com/glt/glui/" SRC_URI="http://www.nigels.com/glt/glui/${MY_P}.tgz" # Set the source directory, since the upstream tarball uses a different naming # convention S=${WORKDIR}/${MY_P} # This patch is based on: # http://http.us.debian.org/debian/pool/main/g/glui/glui_2.2-1.diff.gz # (though that patch creates a Makefile which still refers to version 2.1 # # Removed the Debian-specific files; removed the broken upstream Makefiles; # removed the explicit setting of CC, CXX, CFLAGS, CXXFLAGS, and LDFLAGS; # and added building of the shared library GLUI_DEBIAN_PATCH="glui-2.2-r1-debian.diff" SLOT="0" LICENSE="LGPL-2" KEYWORDS="~x86" DEPEND="virtual/opengl virtual/glut" src_unpack() { unpack ${A} epatch ${FILESDIR}/${GLUI_DEBIAN_PATCH} || die "epatch failed" rm ${S}/makefile rm ${S}/makefile.bak } src_compile() { emake || die "emake failed" } src_install() { # This doesn't use einstall, since the Makefile does not have an install # target dolib.a lib/libglui.a dolib.so lib/libglui.so.${PV} # strip minor version (I'm sure there is a better way) dosym libglui.so.${PV} /usr/lib/libglui.so.${PV/.?/} dosym libglui.so.${PV} /usr/lib/libglui.so insinto /usr/include/GL doins glui.h newdoc readme.txt README } pkg_postinst() { einfo "To use this library, link using -lglui and include /usr/include/GL/glui.h" einfo einfo "Note: Examples are not included in this release, pending the creation of" einfo "an updated Makefile" }