pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/py-ninja



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sun May 12 17:45:15 UTC 2024

Added Files:
        pkgsrc/devel/py-ninja: DESCR Makefile PLIST distinfo
        pkgsrc/devel/py-ninja/patches: patch-CMakeLists.txt

Log Message:
devel/py-ninja: import py-ninja-1.11.1.1

Ninja is a small build system with a focus on speed.

The latest Ninja python wheels provide a ninja executable and
ninja_syntax.py for generating .ninja files.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/py-ninja/DESCR \
    pkgsrc/devel/py-ninja/Makefile pkgsrc/devel/py-ninja/PLIST \
    pkgsrc/devel/py-ninja/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/py-ninja/patches/patch-CMakeLists.txt

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

Added files:

Index: pkgsrc/devel/py-ninja/DESCR
diff -u /dev/null pkgsrc/devel/py-ninja/DESCR:1.1
--- /dev/null   Sun May 12 17:45:15 2024
+++ pkgsrc/devel/py-ninja/DESCR Sun May 12 17:45:15 2024
@@ -0,0 +1,4 @@
+Ninja is a small build system with a focus on speed.
+
+The latest Ninja python wheels provide a ninja executable and
+ninja_syntax.py for generating .ninja files.
Index: pkgsrc/devel/py-ninja/Makefile
diff -u /dev/null pkgsrc/devel/py-ninja/Makefile:1.1
--- /dev/null   Sun May 12 17:45:15 2024
+++ pkgsrc/devel/py-ninja/Makefile      Sun May 12 17:45:15 2024
@@ -0,0 +1,40 @@
+# $NetBSD: Makefile,v 1.1 2024/05/12 17:45:15 wiz Exp $
+
+DISTNAME=      ninja-1.11.1.1
+PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
+CATEGORIES=    devel
+MASTER_SITES=  ${MASTER_SITE_PYPI:=n/ninja/}
+DISTFILES=     ${DEFAULT_DISTFILES} ninja-1.11.1.tar.gz
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://pypi.org/project/ninja/
+COMMENT=       Python bindings for the ninja build tool
+LICENSE=       apache-2.0
+
+TOOL_DEPENDS+= ${PYPKGPREFIX}-scikit-build-[0-9]*:../../devel/py-scikit-build
+TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
+TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm
+TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel
+TOOL_DEPENDS+= cmake-[0-9]*:../../devel/cmake
+DEPENDS+=      ninja-build-[0-9]*:../../devel/ninja-build
+TEST_DEPENDS+= ${PYPKGPREFIX}-path-[0-9]*:../../devel/py-path
+TEST_DEPENDS+= ${PYPKGPREFIX}-test-cov-[0-9]*:../../devel/py-test-cov
+TEST_DEPENDS+= ${PYPKGPREFIX}-test-virtualenv-[0-9]*:../../devel/py-test-virtualenv
+
+USE_LANGUAGES+=        c c++
+
+PYTHON_VERSIONS_INCOMPATIBLE=  27
+
+INSTALLATION_DIRS+=    ${PYSITELIB}/ninja/data/bin
+
+# avoid building ninja again, just provide source code so CMake is happy
+post-extract:
+       cd ${WRKSRC} && ${LN} -s ../ninja-1.11.1 Ninja-src
+
+# add symlink where the normal build system would put the freshly-compiled ninja binary
+post-install:
+       ${RM} ${DESTDIR}${PREFIX}/bin/ninja
+       cd ${DESTDIR}${PREFIX}/${PYSITELIB}/ninja/data/bin && ${LN} -s ${PREFIX}/bin/ninja .
+
+.include "../../lang/python/wheel.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/py-ninja/PLIST
diff -u /dev/null pkgsrc/devel/py-ninja/PLIST:1.1
--- /dev/null   Sun May 12 17:45:15 2024
+++ pkgsrc/devel/py-ninja/PLIST Sun May 12 17:45:15 2024
@@ -0,0 +1,22 @@
+@comment $NetBSD: PLIST,v 1.1 2024/05/12 17:45:15 wiz Exp $
+${PYSITELIB}/${WHEEL_INFODIR}/AUTHORS.rst
+${PYSITELIB}/${WHEEL_INFODIR}/LICENSE_Apache_20
+${PYSITELIB}/${WHEEL_INFODIR}/METADATA
+${PYSITELIB}/${WHEEL_INFODIR}/RECORD
+${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
+${PYSITELIB}/${WHEEL_INFODIR}/entry_points.txt
+${PYSITELIB}/${WHEEL_INFODIR}/top_level.txt
+${PYSITELIB}/ninja/__init__.py
+${PYSITELIB}/ninja/__init__.pyc
+${PYSITELIB}/ninja/__init__.pyo
+${PYSITELIB}/ninja/__main__.py
+${PYSITELIB}/ninja/__main__.pyc
+${PYSITELIB}/ninja/__main__.pyo
+${PYSITELIB}/ninja/_version.py
+${PYSITELIB}/ninja/_version.pyc
+${PYSITELIB}/ninja/_version.pyo
+${PYSITELIB}/ninja/data/bin/ninja
+${PYSITELIB}/ninja/ninja_syntax.py
+${PYSITELIB}/ninja/ninja_syntax.pyc
+${PYSITELIB}/ninja/ninja_syntax.pyo
+${PYSITELIB}/ninja/py.typed
Index: pkgsrc/devel/py-ninja/distinfo
diff -u /dev/null pkgsrc/devel/py-ninja/distinfo:1.1
--- /dev/null   Sun May 12 17:45:15 2024
+++ pkgsrc/devel/py-ninja/distinfo      Sun May 12 17:45:15 2024
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2024/05/12 17:45:15 wiz Exp $
+
+BLAKE2s (ninja-1.11.1.1.tar.gz) = 8c661e3d19e072f989884502c51a5909e908d9a6c5b4a3b6b5312a9a519fed6f
+SHA512 (ninja-1.11.1.1.tar.gz) = 1dd3730c9c71da6279622603b7898c73e751d728a9e94f89d840e667c435cac4cff5c6dd850b7b921113d9adb9637999fc3872c7c18ffd3a4272ebc16947c408
+Size (ninja-1.11.1.1.tar.gz) = 132392 bytes
+BLAKE2s (ninja-1.11.1.tar.gz) = 31edc9a8845b6b1c0f54b8db714d2927b84cf2d0af15754838fcd7c646834a95
+SHA512 (ninja-1.11.1.tar.gz) = 1bca38877c70ee6613f347ffccef5adc02ba0a3947c62ae004ea97f918442b5a3de92378e4f820ae2a7676bc7609d25fbc7d41f6cfb3a61e5e4b26ec3639e403
+Size (ninja-1.11.1.tar.gz) = 229479 bytes
+SHA1 (patch-CMakeLists.txt) = 16553011fc1029fd00ad81a1212f590800b84ad0

Index: pkgsrc/devel/py-ninja/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/devel/py-ninja/patches/patch-CMakeLists.txt:1.1
--- /dev/null   Sun May 12 17:45:15 2024
+++ pkgsrc/devel/py-ninja/patches/patch-CMakeLists.txt  Sun May 12 17:45:15 2024
@@ -0,0 +1,89 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2024/05/12 17:45:15 wiz Exp $
+
+Avoid downloading and building ninja.
+We'll just install a link to the pkgsrc copy in the package Makefile
+instead.
+
+--- CMakeLists.txt.orig        2023-10-09 17:05:36.000000000 +0000
++++ CMakeLists.txt
+@@ -27,7 +27,7 @@ set(src_archive "unix_source")
+ if(WIN32)
+   set(src_archive "windows_source")
+ endif()
+-check_archive_var("${src_archive}")
++#check_archive_var("${src_archive}")
+ 
+ #-----------------------------------------------------------------------------
+ # Summary
+@@ -60,21 +60,6 @@ endif()
+ #-----------------------------------------------------------------------------
+ if(NOT DEFINED Ninja_SOURCE_DIR)
+   set(Ninja_SOURCE_DIR "${CMAKE_SOURCE_DIR}/Ninja-src")
+-
+-  # Download selected source archive
+-  ExternalProject_add(download_ninja_source
+-    SOURCE_DIR ${Ninja_SOURCE_DIR}
+-    URL ${${src_archive}_url}
+-    URL_HASH SHA256=${${src_archive}_sha256}
+-    DOWNLOAD_DIR ${ARCHIVE_DOWNLOAD_DIR}
+-    USES_TERMINAL_DOWNLOAD 1
+-    CONFIGURE_COMMAND ""
+-    BUILD_COMMAND ""
+-    BUILD_IN_SOURCE 1
+-    INSTALL_COMMAND ""
+-    ${ep_download_no_progress_args}
+-    )
+-  message(STATUS "download_ninja_source - URL: ${${src_archive}_url}")
+ elseif(NOT EXISTS ${Ninja_SOURCE_DIR})
+   message(FATAL_ERROR "Ninja_SOURCE_DIR is set to a nonexistent directory")
+ endif()
+@@ -102,48 +87,5 @@ foreach(var_name IN ITEMS
+   endif()
+ endforeach()
+ 
+-# _cache_args should not be empty
+-list(APPEND _cache_args -DNINJA_SUPERBUILD:BOOL=true)
+-ExternalProject_add(build_ninja
+-  SOURCE_DIR ${Ninja_SOURCE_DIR}
+-  BINARY_DIR ${Ninja_BINARY_DIR}
+-  DOWNLOAD_COMMAND ""
+-  UPDATE_COMMAND ""
+-  BUILD_ALWAYS 1
+-  USES_TERMINAL_CONFIGURE 1
+-  USES_TERMINAL_BUILD 1
+-  INSTALL_COMMAND ""
+-  CMAKE_CACHE_ARGS ${_cache_args}
+-  DEPENDS
+-    download_ninja_source
+-  )
+-set(ninja_executable ${Ninja_BINARY_DIR}/ninja${CMAKE_EXECUTABLE_SUFFIX})
+-set(NINJA_BUILD_LAST_STEP "build")
+-
+-# This should not be stripped or tested if cross-compiling on Windows
+-if(CMAKE_CROSS_COMPILE OR NOT DEFINED ENV{DIST_EXTRA_CONFIG})
+-  find_program(STRIP_EXECUTABLE strip)
+-  if(STRIP_EXECUTABLE)
+-    ExternalProject_Add_Step(build_ninja strip_executables
+-      DEPENDEES ${NINJA_BUILD_LAST_STEP}
+-      COMMENT "Stripping CMake executables"
+-      COMMAND ${STRIP_EXECUTABLE} ${ninja_executable}
+-      USES_TERMINAL 1
+-      )
+-    set(NINJA_BUILD_LAST_STEP "strip_executables")
+-  endif()
+-
+-  if(RUN_NINJA_TEST)
+-    ExternalProject_Add_Step(build_ninja run_ninja_test_suite
+-      DEPENDEES ${NINJA_BUILD_LAST_STEP}
+-      COMMENT "Running Ninja test suite"
+-      COMMAND ${Ninja_BINARY_DIR}/ninja_test${CMAKE_EXECUTABLE_SUFFIX}
+-      WORKING_DIRECTORY ${Ninja_BINARY_DIR}
+-      USES_TERMINAL 1
+-      )
+-    set(NINJA_BUILD_LAST_STEP "run_ninja_test_suite")
+-  endif()
+-endif()
+-
+ install(FILES ${Ninja_SOURCE_DIR}/misc/ninja_syntax.py DESTINATION src/ninja)
+-install(PROGRAMS ${ninja_executable} DESTINATION src/ninja/data/bin)
++#install(PROGRAMS ${ninja_executable} DESTINATION src/ninja/data/bin)



Home | Main Index | Thread Index | Old Index