summaryrefslogtreecommitdiff
path: root/dev-python/gdmodule
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/gdmodule
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/gdmodule')
-rw-r--r--dev-python/gdmodule/Manifest4
-rw-r--r--dev-python/gdmodule/files/gdmodule-0.56-fix-libs.patch116
-rw-r--r--dev-python/gdmodule/gdmodule-0.56-r2.ebuild41
-rw-r--r--dev-python/gdmodule/metadata.xml14
4 files changed, 175 insertions, 0 deletions
diff --git a/dev-python/gdmodule/Manifest b/dev-python/gdmodule/Manifest
new file mode 100644
index 000000000000..400cf8ddd8fd
--- /dev/null
+++ b/dev-python/gdmodule/Manifest
@@ -0,0 +1,4 @@
+AUX gdmodule-0.56-fix-libs.patch 2629 BLAKE2B ea89424775c3461a06cde21e5b0f8dd5d7e3bb35e5404b5a93be42a9509b01d32d382829a2360fc70ca43cf633bde99833edb949b8387484142e6c314f9f609f SHA512 eb8993b77f5b893b568d87e572a19caf84ee11e4c0c76a13ef81e7185678bf007d7967e1d68ce56f869bc83cfe502b8f67ab0fee2f7f477e9aa2b4f0017e0a0a
+DIST gdmodule-0.56.tar.gz 48748 BLAKE2B 56a348a3a6c62a6d805d13ce80dfd2082af4a103d08d9a2466aa719d07b1bf8d52e0f08b48738377d1145a467b78aed0d7607f450c119c1a9c0eb9c2b39f038b SHA512 9570a9c06a1c7d76af760fffe30cfde9a840620c608f0d55123898e030d6f3ab4c91fe75bf02b326f13f4a85ea5429c6a0ec0cd20fdc27fa83e656b81f7cce88
+EBUILD gdmodule-0.56-r2.ebuild 1104 BLAKE2B 8f77fbc6e0a01454e8fb8ea9859ac5df1d25f1db2a086a9d3e112833d9481b0272e6b045a497ea5556e70660a348c825682f88d75b0fc098f9ccb06450dd5477 SHA512 10248982c643358824fe477c38e48389ea84b562e42f8856c90d08c07ef669dc02bab0034f49f373b99632817395506abdf4401512bd3151a62e5ff23c720e8f
+MISC metadata.xml 450 BLAKE2B 47c85c159ef7d3b0c873eb7c4e22a73133288d28f776b7e5bafc4f6dda97b97f8b6740a291de0b1d9a70bf958d6aab18b7dc9d693eff76da3ad678d022102425 SHA512 58ab6153c0955e9d9e37fe1b43c3b92cfd3133bdb9f0b52df7618d21fa14170cab255a06d88a110a0bfef09da6cf51c13bc8904d15d1585bd4cc1743b7846900
diff --git a/dev-python/gdmodule/files/gdmodule-0.56-fix-libs.patch b/dev-python/gdmodule/files/gdmodule-0.56-fix-libs.patch
new file mode 100644
index 000000000000..bb46490986a9
--- /dev/null
+++ b/dev-python/gdmodule/files/gdmodule-0.56-fix-libs.patch
@@ -0,0 +1,116 @@
+--- Setup.py.orig 2005-03-11 04:29:59.000000000 +0000
++++ Setup.py 2010-12-06 07:15:26.332707178 +0000
+@@ -1,102 +1,11 @@
+ # Setup for gdmodule 0.50 and later
+
+ from distutils.core import setup, Extension
+-import os, glob, sys, string
+
+ # version of this gdmodule package
+ this_version = "0.56"
+
+-# directory existence tester
+-
+-def dirtest(lst):
+- rlst = []
+- for d in lst:
+- try:
+- if os.listdir(d):
+- rlst.append(d)
+- except:
+- pass
+- return rlst
+-
+-def filetest(path, names):
+- rlst = []
+- for d in path:
+- for i in range(len(names)):
+- found = glob.glob(os.path.join(d, "lib%s.*" % names[i]))
+- if found:
+- rlst.append(names[i])
+- names[i] = None
+- names = filter(None, names)
+- return rlst
+-
+-def remove(itm, lst):
+- r = range(len(lst))
+- r.reverse()
+- for i in r:
+- if lst[i] == itm:
+- del lst[i]
+-
+-# library_dirs option is rather non-portable, but since I am targetting
+-# Unixoid OS's I will just look for the usual suspects.
+-
+-libdirs = dirtest([
+- "/usr/local/lib", "/sw/lib", "/usr/lib",
+- "/usr/lib/X11", "/usr/X11R6/lib",
+- "/opt/gnome/lib",
+-])
+-
+-# include_dirs are also non-portable; same trick here.
+-
+-incdirs = dirtest([
+- "/usr/local/include", "/sw/include", "/usr/include",
+- "/usr/include/X11", "/usr/X11R6/include",
+- "/opt/gnome/include",
+-])
+-
+-# Try to identify our libraries
+-
+-want_libs = [
+- "gd",
+- "jpeg", "png", "gif", "z",
+- "X11", "Xpm",
+- "ttf", "freetype",
+-]
+-
+-libs = filetest(libdirs, want_libs)
+-
+-missing = []
+-
+-for l in want_libs:
+- if l and l not in libs:
+- missing.append(l)
+-
+-if missing:
+- print "WARNING: Missing", string.join(missing, ", "), "Libraries"
+-
+-# hand-clean the libs
+-
+-if "gd" not in libs:
+- print "Can't find GD library."
+- sys.exit(0)
+-
+-if "ttf" in libs and "freetype" in libs:
+- remove("ttf", libs)
+-
+-if "Xpm" in libs and "X11" not in libs:
+- remove("Xpm", libs)
+-
+-if "png" in libs and "z" not in libs:
+- remove("png", libs)
+-
+-if "z" in libs and "png" not in libs:
+- remove("png", libs)
+-
+-# build the macro list
+-
+-macros = []
+-
+-for l in libs:
+- macros.append(( "HAVE_LIB%s" % l.upper(), None ))
++libs = [ "gd" ]
+
+ # OK, now do it!
+
+@@ -111,8 +20,7 @@
+ py_modules=["gd"],
+ ext_modules=[
+ Extension("_gd", ["_gdmodule.c"],
+- include_dirs=incdirs, library_dirs=libdirs,
+- libraries=libs, define_macros=macros)],
++ libraries=libs)],
+ )
+
+ # end of file... I guess we're done.
diff --git a/dev-python/gdmodule/gdmodule-0.56-r2.ebuild b/dev-python/gdmodule/gdmodule-0.56-r2.ebuild
new file mode 100644
index 000000000000..0ca691c8e2af
--- /dev/null
+++ b/dev-python/gdmodule/gdmodule-0.56-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 flag-o-matic
+
+DESCRIPTION="Python extensions for gd"
+HOMEPAGE="https://github.com/Solomoriah/gdmodule"
+SRC_URI="http://newcenturycomputers.net/projects/download.cgi/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~ppc-macos ~x86-linux"
+IUSE="jpeg png truetype xpm"
+
+RDEPEND="
+ media-libs/gd[jpeg?,png?,truetype?,xpm?]
+ media-libs/giflib
+ jpeg? ( virtual/jpeg:0 )
+ png? ( media-libs/libpng:0 )
+ truetype? ( media-libs/freetype:2 )
+ xpm? ( x11-libs/libXpm )"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-fix-libs.patch )
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+ mv Setup.py setup.py || die
+
+ # append unconditionally because it is enabled id media-libs/gd by default
+ append-cppflags -DHAVE_LIBGIF
+
+ use jpeg && append-cppflags -DHAVE_LIBJPEG
+ use png && append-cppflags -DHAVE_LIBPNG
+ use truetype && append-cppflags -DHAVE_LIBFREETYPE
+ use xpm && append-cppflags -DHAVE_LIBXPM
+}
diff --git a/dev-python/gdmodule/metadata.xml b/dev-python/gdmodule/metadata.xml
new file mode 100644
index 000000000000..6304ac511407
--- /dev/null
+++ b/dev-python/gdmodule/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ This module is a python wrapper for the GD library.
+</longdescription>
+ <upstream>
+ <remote-id type="github">Solomoriah/gdmodule</remote-id>
+ </upstream>
+</pkgmetadata>