[csw-devel] SF.net SVN: gar:[21869] csw/mgar/pkg/lang-python

pfelecan at users.sourceforge.net pfelecan at users.sourceforge.net
Thu Aug 29 11:48:18 CEST 2013


Revision: 21869
          http://gar.svn.sourceforge.net/gar/?rev=21869&view=rev
Author:   pfelecan
Date:     2013-08-29 09:48:18 +0000 (Thu, 29 Aug 2013)
Log Message:
-----------
lang-python/calibre:
- packaging complete
- support only Python 2.7
- builds only with the last Qt4 recipe, revision 21645
- builds only with the last pyqt recipe, revision 21868

Revision Links:
--------------
    http://gar.svn.sourceforge.net/gar/?rev=21645&view=rev
    http://gar.svn.sourceforge.net/gar/?rev=21868&view=rev

Added Paths:
-----------
    csw/mgar/pkg/lang-python/calibre/
    csw/mgar/pkg/lang-python/calibre/Makefile
    csw/mgar/pkg/lang-python/calibre/branches/
    csw/mgar/pkg/lang-python/calibre/tags/
    csw/mgar/pkg/lang-python/calibre/trunk/
    csw/mgar/pkg/lang-python/calibre/trunk/Makefile
    csw/mgar/pkg/lang-python/calibre/trunk/checksums
    csw/mgar/pkg/lang-python/calibre/trunk/files/
    csw/mgar/pkg/lang-python/calibre/trunk/files/0001-solaris-extensions.patch
    csw/mgar/pkg/lang-python/calibre/trunk/files/0002-add-timer-macros.patch
    csw/mgar/pkg/lang-python/calibre/trunk/files/0003-endianness-and-byte-order.patch

Added: csw/mgar/pkg/lang-python/calibre/Makefile
===================================================================
--- csw/mgar/pkg/lang-python/calibre/Makefile	                        (rev 0)
+++ csw/mgar/pkg/lang-python/calibre/Makefile	2013-08-29 09:48:18 UTC (rev 21869)
@@ -0,0 +1,2 @@
+%:
+	$(MAKE) -C trunk $*


Property changes on: csw/mgar/pkg/lang-python/calibre/trunk
___________________________________________________________________
Added: svn:ignore
   + work


Added: csw/mgar/pkg/lang-python/calibre/trunk/Makefile
===================================================================
--- csw/mgar/pkg/lang-python/calibre/trunk/Makefile	                        (rev 0)
+++ csw/mgar/pkg/lang-python/calibre/trunk/Makefile	2013-08-29 09:48:18 UTC (rev 21869)
@@ -0,0 +1,80 @@
+# $Id$
+
+NAME			=	calibre
+VERSION			=	0.9.38
+#CATEGORIES		=	python
+PYTHON_VERSION	=	2_7
+GARTYPE			=	v2
+
+DESCRIPTION	=	e-book converter and library management
+define BLURB
+    calibre is an e-book manager. It can view, convert and catalog e-books 
+    in all of the major e-book formats. It can also talk to e-book reader 
+    devices. It can go out to the internet and fetch metadata for your books. 
+    It can download newspapers and convert them into e-books for convenient 
+    reading. It is cross platform, running on Linux, Windows, OS X and now
+	Solaris.
+endef
+
+MASTER_SITES	=	http://download.calibre-ebook.com/$(VERSION)/
+SPKG_SOURCEURL	=	$(MASTER_SITES)
+DISTNAME		=	$(NAME)
+DISTFILES 		=	$(NAME)-$(VERSION).tar.xz
+LICENSE			=	LICENSE
+PATCHFILES 		+= 	0001-solaris-extensions.patch
+PATCHFILES		+= 	0002-add-timer-macros.patch
+PATCHFILES		+=	0003-endianness-and-byte-order.patch
+
+BUILD_DEP_PKGS	+=	CSWpy-sip
+BUILD_DEP_PKGS	+=	CSWpython27-dev
+BUILD_DEP_PKGS	+=	CSWqt4-dev
+BUILD_DEP_PKGS	+=	CSWpy-pyqt
+BUILD_DEP_PKGS	+=	CSWimagemagick-dev
+BUILD_DEP_PKGS	+=	CSWxdg-utils
+BUILD_DEP_PKGS	+=	CSWpy-lxml
+BUILD_DEP_PKGS	+=	CSWpy-dateutil
+BUILD_DEP_PKGS	+=	CSWpy-cssutils
+BUILD_DEP_PKGS	+=	CSWpy-beautifulsoup4
+BUILD_DEP_PKGS	+=	CSWpy-dnspython
+BUILD_DEP_PKGS	+=	CSWpoppler-dev
+BUILD_DEP_PKGS	+=	CSWlibpodofo-dev
+BUILD_DEP_PKGS	+=	CSWlibwmf-dev
+BUILD_DEP_PKGS	+=	CSWlibchm-dev
+BUILD_DEP_PKGS	+=	CSWlibicu-dev
+BUILD_DEP_PKGS	+=	CSWlibmtp-dev
+BUILD_DEP_PKGS	+=	CSWpy-netifaces
+BUILD_DEP_PKGS	+=	CSWpsutils
+BUILD_DEP_PKGS	+=	CSWpy-cssselect
+
+GARCOMPILER		=	GNU
+
+CONFIGURE_SCRIPTS	=	
+BUILD_SCRIPTS		=	custom
+TEST_SCRIPTS		=
+INSTALL_SCRIPTS		=	custom
+
+include gar/category.mk
+
+PATH := /opt/csw/gnu:$(PATH)
+
+build-custom:
+	cd $(WORKSRC) && \
+	 	/usr/bin/env -i \
+			$(BUILD_ENV) \
+			OVERRIDE_CFLAGS="$(CFLAGS)" \
+			OVERRIDE_LDFLAGS="$(LDFLAGS)b" \
+			PODOFO_INC_DIR=$(includedir)/podofo \
+			PODOFO_LIB_DIR=$(libdir) \
+			$(PYTHON_EXECUTABLE) setup.py build
+	@$(MAKECOOKIE)
+
+install-custom:
+	cd $(WORKSRC) && \
+		/usr/bin/env -i \
+			$(INSTALL_ENV) \
+			OVERRIDE_CFLAGS="$(CFLAGS)" \
+			OVERRIDE_LDFLAGS="$(LDFLAGS)b" \
+			PODOFO_INC_DIR=$(includedir)/podofo \
+			PODOFO_LIB_DIR=$(libdir) \
+			$(PYTHON_EXECUTABLE) setup.py install --staging-root=$(DESTDIR)$(prefix)
+	@$(MAKECOOKIE)


Property changes on: csw/mgar/pkg/lang-python/calibre/trunk/Makefile
___________________________________________________________________
Added: svn:keywords
   + Id

Added: csw/mgar/pkg/lang-python/calibre/trunk/checksums
===================================================================
--- csw/mgar/pkg/lang-python/calibre/trunk/checksums	                        (rev 0)
+++ csw/mgar/pkg/lang-python/calibre/trunk/checksums	2013-08-29 09:48:18 UTC (rev 21869)
@@ -0,0 +1 @@
+7dac0c5896d3affb87667fe5dbdf9019  calibre-0.9.38.tar.xz

Added: csw/mgar/pkg/lang-python/calibre/trunk/files/0001-solaris-extensions.patch
===================================================================
--- csw/mgar/pkg/lang-python/calibre/trunk/files/0001-solaris-extensions.patch	                        (rev 0)
+++ csw/mgar/pkg/lang-python/calibre/trunk/files/0001-solaris-extensions.patch	2013-08-29 09:48:18 UTC (rev 21869)
@@ -0,0 +1,93 @@
+From c7ad91b291cd486fcf6e0b5444b1a6aaad0150d2 Mon Sep 17 00:00:00 2001
+From: Peter Felecan <pfelecan at opencsw.org>
+Date: Thu, 29 Aug 2013 11:13:46 +0200
+Subject: [PATCH] solaris extensions
+
+- introduce a specific platform boolean
+- adapt the extensions to the platform
+- includes CSW specifc X11 header for some definitions not found in the system
+  provided ones
+---
+ setup/__init__.py   |  1 +
+ setup/extensions.py | 39 ++++++++++++++++++++-------------------
+ 2 files changed, 21 insertions(+), 19 deletions(-)
+
+diff --git a/setup/__init__.py b/setup/__init__.py
+index 49d3225..f77e832 100644
+--- a/setup/__init__.py
++++ b/setup/__init__.py
+@@ -13,6 +13,7 @@ iswindows = re.search('win(32|64)', sys.platform)
+ isosx = 'darwin' in sys.platform
+ isfreebsd = 'freebsd' in sys.platform
+ isnetbsd = 'netbsd' in sys.platform
++issolaris = 'sunos5' in sys.platform
+ isbsd = isnetbsd or isfreebsd
+ islinux = not isosx and not iswindows and not isbsd
+ SRC = os.path.abspath('src')
+diff --git a/setup/extensions.py b/setup/extensions.py
+index 3b4a37a..939f08a 100644
+--- a/setup/extensions.py
++++ b/setup/extensions.py
+@@ -12,7 +12,7 @@ from multiprocessing import cpu_count
+ 
+ from PyQt4.pyqtconfig import QtGuiModuleMakefile
+ 
+-from setup import Command, islinux, isbsd, isosx, SRC, iswindows
++from setup import Command, islinux, issolaris, isbsd, isosx, SRC, iswindows
+ from setup.build_environment import (chmlib_inc_dirs,
+         podofo_inc, podofo_lib, podofo_error, pyqt, OSX_SDK, NMAKE, QMAKE,
+         msvc, MT, win_inc, win_lib, win_ddk, magick_inc_dirs, magick_lib_dirs,
+@@ -248,23 +248,24 @@ if isosx:
+             )
+ 
+ if islinux or isosx:
+-    extensions.append(Extension('libusb',
+-        ['calibre/devices/libusb/libusb.c'],
+-        libraries=['usb-1.0']
+-    ))
+-
+-    extensions.append(Extension('libmtp',
+-        [
+-        'calibre/devices/mtp/unix/devices.c',
+-        'calibre/devices/mtp/unix/libmtp.c'
+-        ],
+-        headers=[
+-        'calibre/devices/mtp/unix/devices.h',
+-        'calibre/devices/mtp/unix/upstream/music-players.h',
+-        'calibre/devices/mtp/unix/upstream/device-flags.h',
+-        ],
+-        libraries=['mtp']
+-    ))
++    if not issolaris:
++        extensions.append(Extension('libusb',
++            ['calibre/devices/libusb/libusb.c'],
++            libraries=['usb-1.0']
++        ))
++
++        extensions.append(Extension('libmtp',
++            [
++            'calibre/devices/mtp/unix/devices.c',
++            'calibre/devices/mtp/unix/libmtp.c'
++            ],
++            headers=[
++            'calibre/devices/mtp/unix/devices.h',
++            'calibre/devices/mtp/unix/upstream/music-players.h',
++            'calibre/devices/mtp/unix/upstream/device-flags.h',
++            ],
++            libraries=['mtp']
++        ))
+ 
+ if isunix:
+     cc = os.environ.get('CC', 'gcc')
+@@ -498,7 +499,7 @@ class Build(Command):
+         DESTDIR = .
+         TARGET = calibre
+         QT *= svg
+-        INCLUDEPATH *= {conf} {inc}
++        INCLUDEPATH *= {conf} {inc} "/opt/csw/X11/include"
+         win32-msvc*:DEFINES *= _CRT_SECURE_NO_WARNINGS
+ 
+         # Force C++ language
+-- 
+1.8.3.4
+

Added: csw/mgar/pkg/lang-python/calibre/trunk/files/0002-add-timer-macros.patch
===================================================================
--- csw/mgar/pkg/lang-python/calibre/trunk/files/0002-add-timer-macros.patch	                        (rev 0)
+++ csw/mgar/pkg/lang-python/calibre/trunk/files/0002-add-timer-macros.patch	2013-08-29 09:48:18 UTC (rev 21869)
@@ -0,0 +1,45 @@
+From 4585ceaf27b3cc33d7ac198e1f2783f66e9023fa Mon Sep 17 00:00:00 2001
+From: Peter Felecan <pfelecan at opencsw.org>
+Date: Thu, 29 Aug 2013 11:18:14 +0200
+Subject: [PATCH] add timer macros
+
+not defined for Solaris but existing in Linux
+---
+ src/qtcurve/config.h | 24 +++++++++++++++++++++++-
+ 1 file changed, 23 insertions(+), 1 deletion(-)
+
+diff --git a/src/qtcurve/config.h b/src/qtcurve/config.h
+index 19ce0bf..aa34f0c 100644
+--- a/src/qtcurve/config.h
++++ b/src/qtcurve/config.h
+@@ -9,4 +9,26 @@
+ #undef QTC_STYLE_SUPPORT
+ /* #undef QTC_KWIN_MAX_BUTTON_HACK */
+ 
+-
++#if !defined(timeradd)
++#define timeradd(a, b, result)                                                \
++  do {                                                                        \
++    (result)->tv_sec = (a)->tv_sec + (b)->tv_sec;                             \
++    (result)->tv_usec = (a)->tv_usec + (b)->tv_usec;                          \
++    if ((result)->tv_usec >= 1000000)                                         \
++      {                                                                       \
++        ++(result)->tv_sec;                                                   \
++        (result)->tv_usec -= 1000000;                                         \
++      }                                                                       \
++  } while (0)
++#endif /* : !defined(timeradd) */
++#if !defined(timersub)
++#define timersub(a, b, result)                                                \
++  do {                                                                        \
++    (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;                             \
++    (result)->tv_usec = (a)->tv_usec - (b)->tv_usec;                          \
++    if ((result)->tv_usec < 0) {                                              \
++      --(result)->tv_sec;                                                     \
++      (result)->tv_usec += 1000000;                                           \
++    }                                                                         \
++  } while (0)
++#endif /* : !defined(timersub) */
+-- 
+1.8.3.4
+

Added: csw/mgar/pkg/lang-python/calibre/trunk/files/0003-endianness-and-byte-order.patch
===================================================================
--- csw/mgar/pkg/lang-python/calibre/trunk/files/0003-endianness-and-byte-order.patch	                        (rev 0)
+++ csw/mgar/pkg/lang-python/calibre/trunk/files/0003-endianness-and-byte-order.patch	2013-08-29 09:48:18 UTC (rev 21869)
@@ -0,0 +1,53 @@
+From aedbeea97cf8e986d7c05a76cf0d613886e3bdd5 Mon Sep 17 00:00:00 2001
+From: Peter Felecan <pfelecan at opencsw.org>
+Date: Thu, 29 Aug 2013 11:20:50 +0200
+Subject: [PATCH] endianness and byte order
+
+again some linuxisms
+---
+ src/unrar/os.hpp | 21 +++++++++++++++++++--
+ 1 file changed, 19 insertions(+), 2 deletions(-)
+
+diff --git a/src/unrar/os.hpp b/src/unrar/os.hpp
+index 21488a8..29fccbe 100644
+--- a/src/unrar/os.hpp
++++ b/src/unrar/os.hpp
+@@ -214,6 +214,23 @@
+ 
+ #endif
+ 
++#if defined(__GNUC__)
++/* all the above is quite bullshit as the GCC defines these values */
++#if defined(BYTE_ORDER)
++#undef BYTE_ORDER
++#endif /* : defined(BYTE_ORDER) */
++#define BYTE_ORDER __BYTE_ORDER__
++#if defined(LITTLE_ENDIAN)
++#undef LITTLE_ENDIAN
++#endif /* : defined(LITTLE_ENDIAN) */
++#define LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
++#if defined(BIG_ENDIAN)
++#undef BIG_ENDIAN
++#endif /* : defined(BIG_ENDIAN) */
++#define BIG_ENDIAN __ORDER_BIG_ENDIAN__
++/* I don't care about __ORDER_PDP_ENDIAN__ */
++#endif /* : defined(__GNUC__) */
++
+   typedef const char* MSGID;
+ 
+ #define safebuf static
+@@ -221,9 +238,9 @@
+ #if !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
+   #if defined(__i386) || defined(i386) || defined(__i386__)
+     #define LITTLE_ENDIAN
+-  #elif defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN
++#elif defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN
+     #define LITTLE_ENDIAN
+-  #elif defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
++#elif defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
+     #define BIG_ENDIAN
+   #else
+     #error "Neither LITTLE_ENDIAN nor BIG_ENDIAN are defined. Define one of them."
+-- 
+1.8.3.4
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list