pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Add py-partio version 1.17.1 to pkgsrc-wip
Module Name: pkgsrc-wip
Committed By: Niclas Rosenvik <nros%pkgsrc.org@localhost>
Pushed By: nros
Date: Sat Nov 11 13:50:43 2023 +0100
Changeset: c7efeb56b96dd29135e3625ea74f971e06b3ad2f
Modified Files:
Makefile
partio/Makefile
partio/distinfo
partio/patches/patch-CMakeLists.txt
Added Files:
partio/Makefile.common
partio/patches/patch-src_py_CMakeLists.txt
py-partio/DESCR
py-partio/Makefile
py-partio/PLIST
Log Message:
Add py-partio version 1.17.1 to pkgsrc-wip
Python bindings for partio.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c7efeb56b96dd29135e3625ea74f971e06b3ad2f
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
partio/Makefile | 21 +++-------------
partio/Makefile.common | 19 ++++++++++++++
partio/distinfo | 3 ++-
partio/patches/patch-CMakeLists.txt | 40 ++++++++++++++++++++++++------
partio/patches/patch-src_py_CMakeLists.txt | 18 ++++++++++++++
py-partio/DESCR | 1 +
py-partio/Makefile | 19 ++++++++++++++
py-partio/PLIST | 4 +++
9 files changed, 99 insertions(+), 27 deletions(-)
diffs:
diff --git a/Makefile b/Makefile
index 7073b91fc3..c98c72bb23 100644
--- a/Makefile
+++ b/Makefile
@@ -4098,6 +4098,7 @@ SUBDIR+= py-parsedmarc
SUBDIR+= py-parserutils
SUBDIR+= py-parsy
SUBDIR+= py-partd
+SUBDIR+= py-partio
SUBDIR+= py-parver
SUBDIR+= py-patch
SUBDIR+= py-patch-ng
diff --git a/partio/Makefile b/partio/Makefile
index 906fe148b2..fbcae477aa 100644
--- a/partio/Makefile
+++ b/partio/Makefile
@@ -1,28 +1,13 @@
# $NetBSD$
-DISTNAME= partio-1.17.1
-CATEGORIES= graphics
-MASTER_SITES= ${MASTER_SITE_GITHUB:=wdas/}
-GITHUB_TAG= v${PKGVERSION_NOREV}
+.include "Makefile.common"
-MAINTAINER= pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE= https://www.disneyanimation.com/open-source/partio/
-COMMENT= Library for handling standard particle formats
-LICENSE= modified-bsd
-
-USE_LANGUAGES= c c++
-USE_CXX_FEATURES= c++14
+COMMENT= Library for handling standard particle formats
+CMAKE_CONFIGURE_ARGS+= -DPARTIO_BUILD_LIB:BOOL=ON
CMAKE_CONFIGURE_ARGS+= -DPARTIO_BUILD_SHARED_LIBS:BOOL=ON
-# https://github.com/wdas/partio/issues/104
-# https://github.com/wdas/partio/issues/17
-# see files src/tools/part*.py in the distfile
-NO_SRC_ON_CDROM= ${RESTRICTED}
-NO_SRC_ON_FTP= ${RESTRICTED}
-
.include "../../devel/cmake/build.mk"
.include "../../devel/zlib/buildlink3.mk"
-.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/partio/Makefile.common b/partio/Makefile.common
new file mode 100644
index 0000000000..ac01ebf8a6
--- /dev/null
+++ b/partio/Makefile.common
@@ -0,0 +1,19 @@
+# $NetBSD$
+# used by wip/py-partio/Makefile
+
+DISTNAME= partio-1.17.1
+CATEGORIES= graphics
+MASTER_SITES= ${MASTER_SITE_GITHUB:=wdas/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://www.disneyanimation.com/open-source/partio/
+LICENSE= modified-bsd
+
+PATCHDIR= ${.CURDIR}/../../wip/partio/patches
+DISTINFO_FILE= ${.CURDIR}/../../wip/partio/distinfo
+
+WRKSRC= ${WRKDIR}/${DISTNAME}
+
+USE_LANGUAGES= c c++
+USE_CXX_FEATURES= c++14
diff --git a/partio/distinfo b/partio/distinfo
index 1fd031c8b1..20409b4a9d 100644
--- a/partio/distinfo
+++ b/partio/distinfo
@@ -3,4 +3,5 @@ $NetBSD$
BLAKE2s (partio-1.17.1.tar.gz) = f0db32ffc432da3bc2b537cc495ece05716606f85c21d55d3a8607d1d3e372c6
SHA512 (partio-1.17.1.tar.gz) = 5dbbd988c76a26ac6f3024e29ed12f37f7995daf211e065b9ffaf185c6203be7d9de48bd62b5955d2f5444af72fb3306ea5a0f3501cb0a49a26f157bb09ec6bc
Size (partio-1.17.1.tar.gz) = 338461 bytes
-SHA1 (patch-CMakeLists.txt) = 1ce993c14887ca6d1434364f18cc6e4167306e8f
+SHA1 (patch-CMakeLists.txt) = 00484e577941550819b19f8124014097431c8ff3
+SHA1 (patch-src_py_CMakeLists.txt) = db6c53edb73d2993212674901bb842bdf8c88ac8
diff --git a/partio/patches/patch-CMakeLists.txt b/partio/patches/patch-CMakeLists.txt
index dcc7f45255..60f0c80107 100644
--- a/partio/patches/patch-CMakeLists.txt
+++ b/partio/patches/patch-CMakeLists.txt
@@ -6,26 +6,50 @@ the things not built.
--- CMakeLists.txt.orig 2023-07-02 02:16:37.000000000 +0000
+++ CMakeLists.txt
-@@ -119,10 +119,6 @@ set(OpenGL_GL_PREFERENCE GLVND)
+@@ -37,6 +37,9 @@ set(PARTIO_VERSION_MAJOR "1")
+
+ option(PARTIO_GTEST_ENABLED "Enable GTest for tests" OFF)
+ option(PARTIO_ORIGIN_RPATH "Enable ORIGIN rpath in the installed libraries" OFF)
++option(PARTIO_BUILD_LIB "Build PARTIO library" OFF)
++option(PARTIO_BUILD_PY "Build PARTIO python bindings" OFF)
++
+
+ if(WIN32 OR APPLE)
+ option(PARTIO_USE_GLVND "Use GLVND for OpenGL" OFF)
+@@ -118,11 +121,14 @@ endif()
+ set(OpenGL_GL_PREFERENCE GLVND)
## Search for useful libraries
- find_package(Threads REQUIRED)
+-find_package(Threads REQUIRED)
-find_package(GLUT REQUIRED)
-find_package(OpenGL REQUIRED)
--find_package(PythonInterp REQUIRED)
--find_package(PythonLibs REQUIRED)
++if(PARTIO_BUILD_PY)
++find_library(PARTIO_LIBRARY NAMES partio REQUIRED)
++find_path(PARTIO_INCLUDE_DIR NAMES Partio.h REQUIRED)
+ find_package(PythonInterp REQUIRED)
+ find_package(PythonLibs REQUIRED)
++endif()
++if(PARTIO_BUILD_LIB)
++find_package(Threads REQUIRED)
find_package(ZLIB)
if (ZLIB_FOUND)
add_definitions(-DPARTIO_USE_ZLIB)
-@@ -135,9 +131,9 @@ set(PARTIO_LIBRARIES partio ${ZLIB_LIBRA
+@@ -132,12 +138,16 @@ endif()
+ # Make modules able to see partio library
+ set(PARTIO_LIBRARIES partio ${ZLIB_LIBRARY})
+-
++endif()
## Traverse subdirectories
++if(PARTIO_BUILD_LIB)
add_subdirectory(src/lib)
-add_subdirectory(src/tools)
--add_subdirectory(src/py)
--add_subdirectory(src/doc)
++endif()
+#add_subdirectory(src/tools)
-+#add_subdirectory(src/py)
++if(PARTIO_BUILD_PY)
+ add_subdirectory(src/py)
+-add_subdirectory(src/doc)
++endif()
+#add_subdirectory(src/doc)
if (${PARTIO_GTEST_ENABLED})
diff --git a/partio/patches/patch-src_py_CMakeLists.txt b/partio/patches/patch-src_py_CMakeLists.txt
new file mode 100644
index 0000000000..87f31fa031
--- /dev/null
+++ b/partio/patches/patch-src_py_CMakeLists.txt
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Use pkgsrc partio when building module.
+
+--- src/py/CMakeLists.txt.orig 2023-07-02 02:16:37.000000000 +0000
++++ src/py/CMakeLists.txt
+@@ -48,9 +48,9 @@ target_include_directories(
+ partio_mod
+ PRIVATE
+ ${PYTHON_INCLUDE_DIRS}
+- ${CMAKE_SOURCE_DIR}/src/lib
++ ${PARTIO_INCLUDE_DIR}
+ )
+-target_link_libraries(partio_mod PRIVATE ${PYTHON_LIBRARIES} partio)
++target_link_libraries(partio_mod PRIVATE ${PYTHON_LIBRARIES} ${PARTIO_LIBRARY})
+
+ set(PYTHON_DEST "${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages" )
+
diff --git a/py-partio/DESCR b/py-partio/DESCR
new file mode 100644
index 0000000000..4a05c60a7a
--- /dev/null
+++ b/py-partio/DESCR
@@ -0,0 +1 @@
+Python bindings for partio
diff --git a/py-partio/Makefile b/py-partio/Makefile
new file mode 100644
index 0000000000..4791b81589
--- /dev/null
+++ b/py-partio/Makefile
@@ -0,0 +1,19 @@
+# $NetBSD$
+
+.include "../../wip/partio/Makefile.common"
+
+PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+
+COMMENT= Python bindings for partio
+
+CMAKE_CONFIGURE_ARGS+= -DPARTIO_BUILD_PY:BOOL=ON
+
+PY_PATCHPLIST= yes
+
+.include "../../devel/cmake/build.mk"
+
+.include "../../devel/swig4/buildlink3.mk"
+.include "../../lang/python/extension.mk"
+BUILDLINK_API_DEPENDS.partio+= partio>=${PKGVERSION_NOREV}
+.include "../../wip/partio/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/py-partio/PLIST b/py-partio/PLIST
new file mode 100644
index 0000000000..91e448533f
--- /dev/null
+++ b/py-partio/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+${PYSITELIB}/_partio.so
+${PYSITELIB}/partio.py
+share/swig/partio.i
Home |
Main Index |
Thread Index |
Old Index