Import devel/pysvn, a python interface to Subversion.

ok landry@
This commit is contained in:
stsp 2010-12-29 13:47:53 +00:00
parent 25cf283a1f
commit 11ff14c3c7
6 changed files with 146 additions and 0 deletions

54
devel/pysvn/Makefile Normal file
View File

@ -0,0 +1,54 @@
# $OpenBSD: Makefile,v 1.1.1.1 2010/12/29 13:47:53 stsp Exp $
COMMENT = python interface to subversion
MODPY_EGG_VERSION = 1.7.2
DISTNAME = pysvn-${MODPY_EGG_VERSION}
PKGNAME = py-pysvn-${MODPY_EGG_VERSION}
CATEGORIES = devel
HOMEPAGE = http://pysvn.tigris.org
MAINTAINER = Stefan Sperling <stsp@openbsd.org>
# Apache v1.1, BSD-like
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM = Yes
PERMIT_DISTFILES_FTP = Yes
MASTER_SITES = http://pysvn.barrys-emacs.org/source_kits/
MODULES = lang/python
LIB_DEPENDS = devel/apr \
devel/subversion,-main
USE_GMAKE = Yes
SHARED_ONLY = Yes
_PYSVN_PYVERSION = ${MODPY_VERSION:S/./_/}
SUBST_VARS += _PYSVN_PYVERSION
WRKSRC = ${WRKDIST}/Source
CONFIGURE_FLAGS = --apr-inc-dir=${LOCALBASE}/include/apr-1 \
--apr-lib-dir=${LOCALBASE}/lib \
--svn-inc-dir=${LOCALBASE}/include/subversion-1 \
--svn-lib-dir=${LOCALBASE}/lib
do-configure:
cd ${WRKSRC} && ${MODPY_BIN} ./${MODPY_SETUP} configure ${CONFIGURE_FLAGS}
do-build:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE}
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/lib/python${MODPY_VERSION}/site-packages/pysvn
${INSTALL_SCRIPT} ${WRKSRC}/pysvn/__init__.py \
${PREFIX}/lib/python${MODPY_VERSION}/site-packages/pysvn/__init__.py
${INSTALL_DATA} ${WRKSRC}/pysvn/_pysvn_${_PYSVN_PYVERSION}.so \
${PREFIX}/lib/python${MODPY_VERSION}/site-packages/pysvn/_pysvn_${_PYSVN_PYVERSION}.so
do-regress:
cd ${WRKDIST}/Tests && ${GMAKE}
.include <bsd.port.mk>

5
devel/pysvn/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (pysvn-1.7.2.tar.gz) = tVehK8NPDWgF4lnWm584zg==
RMD160 (pysvn-1.7.2.tar.gz) = hQJs/2Ga7v3mIrZ397Zpcmm+q08=
SHA1 (pysvn-1.7.2.tar.gz) = 6K+gwfVsgvE/XhfH3RIM+oLIok8=
SHA256 (pysvn-1.7.2.tar.gz) = KymA0gBRXnVOAKEtmdvOJcHqkP3fjLor+jVMkwXF5FU=
SIZE (pysvn-1.7.2.tar.gz) = 333643

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-Examples_Client_svn_cmd_py,v 1.1.1.1 2010/12/29 13:47:53 stsp Exp $
LC_ALL only works for single-byte locales on OpenBSD.
--- Examples/Client/svn_cmd.py.orig Sun Dec 19 17:50:49 2010
+++ Examples/Client/svn_cmd.py Sun Dec 19 17:52:24 2010
@@ -70,7 +70,7 @@ def initLocale():
locale.setlocale( locale.LC_ALL, '%s.%s' % (language_code, encoding) )
except locale.Error:
# force a locale that will work
- locale.setlocale( locale.LC_ALL, 'en_GB.UTF-8' )
+ locale.setlocale( locale.LC_ALL, 'C' )
def fmtDateTime( t ):
return time.strftime( '%d-%b-%Y %H:%M:%S', time.localtime( t ) )

View File

@ -0,0 +1,56 @@
$OpenBSD: patch-Source_setup_configure_py,v 1.1.1.1 2010/12/29 13:47:53 stsp Exp $
1) Remove -lresolv.
2) Fix broken lib auto-detection. The configure script will try to stat a
shared library file, but we don't know the exact filename because it depends
on the shared library version. So look for a .la file instead. These are
present for all libraries the script is looking for.
--- Source/setup_configure.py.orig Tue Dec 29 12:31:15 2009
+++ Source/setup_configure.py Sun Dec 19 17:05:53 2010
@@ -433,7 +433,7 @@ LDLIBS=-L%(svn_lib_dir)s -Wl,--rpath -Wl,%(svn_lib_dir
-lsvn_client-1 \
-lsvn_diff-1 \
-lsvn_repos-1 \
- -lcom_err -lresolv -lexpat -lneon
+ -lcom_err -lexpat -lneon
#include pysvn_common.mak
'''
@@ -455,7 +455,7 @@ LDLIBS=-L%(svn_lib_dir)s -Wl,--rpath -Wl,%(svn_lib_dir
-lsvn_client-1 \
-lsvn_diff-1 \
-lsvn_repos-1 \
- -lresolv -lexpat -lneon
+ -lexpat -lneon
#include pysvn_common.mak
'''
@@ -477,7 +477,7 @@ LDLIBS=-L%(svn_lib_dir)s -Wl,--rpath -Wl,%(svn_lib_dir
-lsvn_client-1 \
-lsvn_diff-1 \
-lsvn_repos-1 \
--lcom_err -lresolv -lexpat -lneon -lssl
+-lcom_err -lexpat -lneon -lssl
PYSVN_CREATE_INIT_OPTION=%(pysvn_module_name)s
#include pysvn_common.mak
@@ -500,7 +500,7 @@ LDLIBS=-L%(svn_lib_dir)s \
-lsvn_client-1 \
-lsvn_diff-1 \
-lsvn_repos-1 \
--lcom_err -lresolv -lexpat -lneon -lssl
+-lcom_err -lexpat -lneon -lssl
PYSVN_CREATE_INIT_OPTION=%(pysvn_module_name)s
#include pysvn_common.mak
@@ -907,7 +907,7 @@ LDLIBS= \
elif self.platform == 'cygwin':
return '%s.dll.a' % libname
else:
- return '%s.so' % libname
+ return '%s.la' % libname
def find_dir( self, name, kw, svn_root_suffix, base_dir_list, check_file ):
dirname = self.__find_dir( name, kw, svn_root_suffix, base_dir_list, check_file )

12
devel/pysvn/pkg/DESCR Normal file
View File

@ -0,0 +1,12 @@
The pysvn module is a python interface to the Subversion version control
system. This API exposes client interfaces for managing a working copy,
querying a repository, and synchronizing the two.
This API cannot create new repositories; it can only interact with existing
repositories. If you need to create a repository, use the svnadmin command from
Subversion.
Using the API, you can check out a working copy, add, edit, and remove working
files, and check in, compare, or discard your changes. Repository properties
such as keyword expansion, end of line characters, and ignore lists can also be
examined and manipulated.

4
devel/pysvn/pkg/PLIST Normal file
View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2010/12/29 13:47:53 stsp Exp $
lib/python${MODPY_VERSION}/site-packages/pysvn/
lib/python${MODPY_VERSION}/site-packages/pysvn/__init__.py
lib/python${MODPY_VERSION}/site-packages/pysvn/_pysvn_${_PYSVN_PYVERSION}.so