diff options
author | Akinori Hattori <hattya@gentoo.org> | 2021-10-04 22:32:49 +0900 |
---|---|---|
committer | Akinori Hattori <hattya@gentoo.org> | 2021-10-04 22:37:41 +0900 |
commit | 47848d3088963101e51b601a146c656657d1893f (patch) | |
tree | 589d640e4c17aa5905d4997a75600b98d78fb45b /dev-scheme | |
parent | dev-scheme/gauche-gl: update to EAPI 7 (diff) | |
download | gentoo-47848d3088963101e51b601a146c656657d1893f.tar.gz gentoo-47848d3088963101e51b601a146c656657d1893f.tar.bz2 gentoo-47848d3088963101e51b601a146c656657d1893f.zip |
dev-scheme/gauche-gl: fix build with USE=cg
Closes: https://bugs.gentoo.org/682046
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Akinori Hattori <hattya@gentoo.org>
Diffstat (limited to 'dev-scheme')
-rw-r--r-- | dev-scheme/gauche-gl/files/gauche-gl-0.6-cg.patch | 47 | ||||
-rw-r--r-- | dev-scheme/gauche-gl/gauche-gl-0.6.ebuild | 13 |
2 files changed, 59 insertions, 1 deletions
diff --git a/dev-scheme/gauche-gl/files/gauche-gl-0.6-cg.patch b/dev-scheme/gauche-gl/files/gauche-gl-0.6-cg.patch new file mode 100644 index 000000000000..3c2b6014a804 --- /dev/null +++ b/dev-scheme/gauche-gl/files/gauche-gl-0.6-cg.patch @@ -0,0 +1,47 @@ +--- a/cg/Makefile.in ++++ b/cg/Makefile.in +@@ -17,8 +17,8 @@ + # These are set by configure + # NB: cc and various flags must match the ones used to compile Gauche, + # so the make invocator shouldn't casually override them. +-CFLAGS = @DEFS@ @CFLAGS@ @X_CFLAGS@ @GLUT_INCDIR@ -I../src +-LDFLAGS = -I../src @LDFLAGS@ ++CFLAGS = @DEFS@ @CFLAGS@ @X_CFLAGS@ @GLUT_INCDIR@ @CG_CFLAGS@ -I../src ++LDFLAGS = @LDFLAGS@ + OBJEXT = @OBJEXT@ + SOEXT = @SOEXT@ + OLIBS = @LIBS@ +--- a/cg/cg-lib.stub ++++ b/cg/cg-lib.stub +@@ -430,7 +430,6 @@ + ;; + ;; Cg/cg_profiles.h + ;; +-(define-enum CG_PROFILE_START) + (define-enum CG_PROFILE_UNKNOWN) + + (define-enum CG_PROFILE_VS_1_1) +@@ -443,8 +442,6 @@ + (define-enum CG_PROFILE_PS_2_0) + (define-enum CG_PROFILE_PS_2_X) + +-(define-enum CG_PROFILE_MAX) +- + ;; + ;; Cg/cg_errors.h + ;; +--- a/configure.ac ++++ b/configure.ac +@@ -46,10 +46,11 @@ + AC_HELP_STRING([--enable-cg], [Enable NVidia's Cg binding.]), [ + AC_DEFINE(HAVE_CG, 1) + ENABLE_CG=1 +- CG_LIBS="-lCgGL -lCg" ++ PKG_CHECK_MODULES([CG], [nvidia-cg-toolkit-gl]) + CG_SCM="cg/gl/cg.scm"; + ]) + AC_SUBST(ENABLE_CG) ++AC_SUBST(CG_CFLAGS) + AC_SUBST(CG_LIBS) + AC_SUBST(CG_SCM) + diff --git a/dev-scheme/gauche-gl/gauche-gl-0.6.ebuild b/dev-scheme/gauche-gl/gauche-gl-0.6.ebuild index fa04d0668dae..4e7df252b476 100644 --- a/dev-scheme/gauche-gl/gauche-gl-0.6.ebuild +++ b/dev-scheme/gauche-gl/gauche-gl-0.6.ebuild @@ -3,6 +3,8 @@ EAPI="7" +inherit autotools + MY_P="${P^g}" DESCRIPTION="OpenGL binding for Gauche" @@ -20,9 +22,18 @@ RDEPEND=">=dev-scheme/gauche-0.9.4 x11-libs/libXmu cg? ( media-gfx/nvidia-cg-toolkit )" DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" S="${WORKDIR}/${MY_P}" -PATCHES=( "${FILESDIR}"/${P}-simple.viewer.patch ) +PATCHES=( + "${FILESDIR}"/${P}-simple.viewer.patch + "${FILESDIR}"/${P}-cg.patch +) + +src_prepare() { + default + eautoreconf +} src_configure() { econf $(usex cg --enable-cg "") |