gentoo/dev-python/gdmodule/files/gdmodule-0.56-fix-libs.patch
Robin H. Johnson 56bd759df1
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.

This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.

Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
2015-08-08 17:38:18 -07:00

117 lines
2.6 KiB
Diff

--- 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.