pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Add pystring version 1.1.3 to pkgsrc-wip



Module Name:	pkgsrc-wip
Committed By:	Niclas Rosenvik <nros%pkgsrc.org@localhost>
Pushed By:	nros
Date:		Sun Mar 13 10:08:29 2022 +0100
Changeset:	eea34763a1880ed12dd93cd81b505d4f4697d5c5

Modified Files:
	Makefile
Added Files:
	pystring/DESCR
	pystring/Makefile
	pystring/PLIST
	pystring/distinfo
	pystring/patches/patch-Makefile
	pystring/patches/patch-pystring.cpp

Log Message:
Add pystring version 1.1.3 to pkgsrc-wip

Pystring is a collection of C++ functions which match the interface and
behavior of python's string class methods using std::string.

Originally developed at Sony Pictures Imageworks.
http://opensource.imageworks.com/

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=eea34763a1880ed12dd93cd81b505d4f4697d5c5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                            |  1 +
 pystring/DESCR                      |  5 +++++
 pystring/Makefile                   | 25 +++++++++++++++++++++++++
 pystring/PLIST                      |  3 +++
 pystring/distinfo                   |  7 +++++++
 pystring/patches/patch-Makefile     | 22 ++++++++++++++++++++++
 pystring/patches/patch-pystring.cpp | 17 +++++++++++++++++
 7 files changed, 80 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 9cb2797553..12fcd8a99d 100644
--- a/Makefile
+++ b/Makefile
@@ -4913,6 +4913,7 @@ SUBDIR+=	pympress
 SUBDIR+=	pypanel
 SUBDIR+=	pypod
 SUBDIR+=	pysite
+SUBDIR+=	pystring
 SUBDIR+=	pythia6
 SUBDIR+=	python3
 SUBDIR+=	pythoncad
diff --git a/pystring/DESCR b/pystring/DESCR
new file mode 100644
index 0000000000..7a74b20b48
--- /dev/null
+++ b/pystring/DESCR
@@ -0,0 +1,5 @@
+Pystring is a collection of C++ functions which match the interface and
+behavior of python's string class methods using std::string.
+
+Originally developed at Sony Pictures Imageworks.
+http://opensource.imageworks.com/
diff --git a/pystring/Makefile b/pystring/Makefile
new file mode 100644
index 0000000000..93078b89e4
--- /dev/null
+++ b/pystring/Makefile
@@ -0,0 +1,25 @@
+# $NetBSD$
+
+GITHUB_TAG=	refs/tags/v${PKGVERSION_NOREV}
+DISTNAME=	pystring-1.1.3
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_GITHUB:=imageworks/}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/imageworks/pystring/
+COMMENT=	Pythons string methods for C++ std::string
+LICENSE=	mit
+
+WRKSRC=		${WRKDIR}/${DISTNAME}
+
+USE_LIBTOOL=	yes
+USE_LANGUAGES=	c++
+USE_TOOLS+=	gmake
+
+INSTALLATION_DIRS+=	include/pystring lib
+
+post-install:
+	${RUN} ${INSTALL_DATA} ${WRKSRC}/pystring.h \
+		${DESTDIR}${PREFIX}/include/pystring
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/pystring/PLIST b/pystring/PLIST
new file mode 100644
index 0000000000..3818082c7e
--- /dev/null
+++ b/pystring/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD$
+include/pystring/pystring.h
+lib/libpystring.la
diff --git a/pystring/distinfo b/pystring/distinfo
new file mode 100644
index 0000000000..f5872d09c1
--- /dev/null
+++ b/pystring/distinfo
@@ -0,0 +1,7 @@
+$NetBSD$
+
+BLAKE2s (pystring-1.1.3.tar.gz) = 91fa8f699f50c4bb24ddadfcebaca9972bbe90c4af68cdb31662cb7313e28fa6
+SHA512 (pystring-1.1.3.tar.gz) = a46bb2e96d6eb351a4a8097cde46ac2877d28e88f9e57e0ac36c42e8fc8543517c4be70306a01e2f88a891fc53c612494aeb37f47a200d94b8e1b050ed16eff6
+Size (pystring-1.1.3.tar.gz) = 18364 bytes
+SHA1 (patch-Makefile) = 5e9a6f5419e0e48b310798c513daced28f3e8745
+SHA1 (patch-pystring.cpp) = 8f5e710e5991abf3875c843596f56328f50c3bba
diff --git a/pystring/patches/patch-Makefile b/pystring/patches/patch-Makefile
new file mode 100644
index 0000000000..edffe8d6a6
--- /dev/null
+++ b/pystring/patches/patch-Makefile
@@ -0,0 +1,22 @@
+$NetBSD$
+
+* Install lib under prefix
+
+--- Makefile.orig	2022-03-13 07:58:23.892668148 +0000
++++ Makefile
+@@ -1,5 +1,5 @@
+ LIBTOOL = libtool
+-LIBDIR = /usr/lib
++LIBDIR = $(PREFIX)/lib
+ CXX = g++
+ CXXFLAGS = -g -O3 -Wall -Wextra -Wshadow -Wconversion -Wcast-qual -Wformat=2
+ 
+@@ -12,7 +12,7 @@ libpystring.la: pystring.lo
+ 	$(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $< -rpath $(LIBDIR)
+ 
+ install: libpystring.la
+-	$(LIBTOOL) --mode=install install -c $< $(LIBDIR)/$<
++	$(LIBTOOL) --mode=install install -c $< $(DESTDIR)$(LIBDIR)/$<
+ 
+ clean:
+ 	$(RM) -fr pystring.lo pystring.o libpystring.la .libs
diff --git a/pystring/patches/patch-pystring.cpp b/pystring/patches/patch-pystring.cpp
new file mode 100644
index 0000000000..4a04c99a93
--- /dev/null
+++ b/pystring/patches/patch-pystring.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+* fix deadlock in split_path, from upstream
+https://github.com/imageworks/pystring/issues/20
+https://github.com/imageworks/pystring/pull/24
+
+--- pystring.cpp.orig	2022-03-13 08:47:35.684732958 +0000
++++ pystring.cpp
+@@ -1361,7 +1361,7 @@ namespace path
+         while(!head2.empty() && ((pystring::slice(head2,-1) == "/") ||
+                                  (pystring::slice(head2,-1) == "\\")))
+         {
+-            head2 = pystring::slice(head,0,-1);
++            head2 = pystring::slice(head2,0,-1);
+         }
+         
+         if(!head2.empty()) head = head2;


Home | Main Index | Thread Index | Old Index