From 81e764d3571eea7b0c9cccebeb30178547dfd411 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 25 Jul 2023 17:03:42 +0200 Subject: [PATCH 1/5] build: Print version errors to stderr instead of stdout --- bin/activate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/activate b/bin/activate index 4de0d5c93..2b0275e37 100755 --- a/bin/activate +++ b/bin/activate @@ -19,7 +19,7 @@ CLANG_VERSION=$(clang --version | grep version | grep -o -m 1 "[0-9]\+\.[0-9]\+\ CLANG_VERSION_NUM=$(echo "$CLANG_VERSION" | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/') if [ $CLANG_VERSION_NUM -lt 100000 ]; then - echo You have clang $CLANG_VERSION installed, but nxdk requires at least version 10. You may experience breakage. + echo You have clang $CLANG_VERSION installed, but nxdk requires at least version 10. You may experience breakage. >&2 fi if [ "$1" = "-s" ]; then cat <<- DONE From af888486e10e20ae50cfe451ccaca1de5dc26281 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 10 Jan 2025 05:50:43 +0100 Subject: [PATCH 2/5] ci: Install pkgconf --- .github/workflows/build_samples.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_samples.yml b/.github/workflows/build_samples.yml index b80032bf1..132d277a1 100644 --- a/.github/workflows/build_samples.yml +++ b/.github/workflows/build_samples.yml @@ -42,7 +42,7 @@ jobs: HOMEBREW_NO_ANALYTICS: 1 HOMEBREW_NO_INSTALL_CLEANUP: 1 run: | - brew install lld llvm coreutils + brew install lld llvm coreutils pkgconf - name: Build run: ./.ci_build_samples.sh ubuntu: @@ -57,6 +57,6 @@ jobs: - name: Install Dependencies run: | sudo apt-get -y update - sudo apt-get -y install llvm lld + sudo apt-get -y install llvm lld pkgconf - name: Build run: ./.ci_build_samples.sh From 05c7f442caeb8364d579f65a8cc34130331751aa Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 10 Jan 2025 06:10:37 +0100 Subject: [PATCH 3/5] build: Use pkgconf instead of pkg-config --- bin/nxdk-pkg-config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/nxdk-pkg-config b/bin/nxdk-pkg-config index 8904e17c7..8113a7b1e 100755 --- a/bin/nxdk-pkg-config +++ b/bin/nxdk-pkg-config @@ -9,9 +9,9 @@ export PKG_CONFIG_PATH="" export PKG_CONFIG_SYSROOT_DIR="" export PKG_CONFIG_LIBDIR=${NXDK_DIR}/lib/pkgconfig:${NXDK_DIR}/share/pkgconfig -[ "$1" = '--version' ] && exec pkg-config --version -exec pkg-config \ +[ "$1" = '--version' ] && exec pkgconf --version +exec pkgconf \ --define-variable=NXDK_DIR=${NXDK_DIR} \ --define-prefix \ --static \ - "$@" + "$@" | sed 's/\.lib\.lib/\.lib/g' From 728fb834335684117412e6ec5db883461c1937ce Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Sat, 11 Mar 2023 16:00:00 -0600 Subject: [PATCH 4/5] build: Fix NXDK_DIR expansion syntax in libjpeg.pc --- lib/pkgconfig/libjpeg.pc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pkgconfig/libjpeg.pc b/lib/pkgconfig/libjpeg.pc index 5f6ffab06..89d524083 100644 --- a/lib/pkgconfig/libjpeg.pc +++ b/lib/pkgconfig/libjpeg.pc @@ -2,4 +2,4 @@ Name: libjpeg Description: A SIMD-accelerated JPEG codec that provides the libjpeg API Version: 2.0.4 Libs: ${NXDK_DIR}/lib/libjpeg.lib -Cflags: -I${NXDK_DIR}/lib/libjpeg/libjpeg-turbo -I$(NXDK_DIR)/lib/libjpeg +Cflags: -I${NXDK_DIR}/lib/libjpeg/libjpeg-turbo -I${NXDK_DIR}/lib/libjpeg From 3ac70349a12c534b0fca699166ec46ed29920f00 Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Sun, 12 Mar 2023 11:29:38 -0500 Subject: [PATCH 5/5] build: Use ld syntax in pkg-config files for CMake compatibility --- lib/pkgconfig/SDL2_image.pc | 2 +- lib/pkgconfig/SDL2_ttf.pc | 2 +- lib/pkgconfig/libjpeg.pc | 2 +- lib/pkgconfig/libpng.pc | 2 +- lib/pkgconfig/sdl2.pc | 2 +- lib/pkgconfig/zlib.pc | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/pkgconfig/SDL2_image.pc b/lib/pkgconfig/SDL2_image.pc index 7d261abe7..f997e9101 100644 --- a/lib/pkgconfig/SDL2_image.pc +++ b/lib/pkgconfig/SDL2_image.pc @@ -2,5 +2,5 @@ Name: SDL2_image Description: image loading library for Simple DirectMedia Layer Version: 2.0.5 Requires: sdl2 >= 2.0.9 libjpeg libpng -Libs: ${NXDK_DIR}/lib/libSDL2_image.lib +Libs: -l${NXDK_DIR}/lib/libSDL2_image.lib Cflags: -I${NXDK_DIR}/lib/sdl/SDL2_image diff --git a/lib/pkgconfig/SDL2_ttf.pc b/lib/pkgconfig/SDL2_ttf.pc index f0e25ada8..a7043dc55 100644 --- a/lib/pkgconfig/SDL2_ttf.pc +++ b/lib/pkgconfig/SDL2_ttf.pc @@ -2,5 +2,5 @@ Name: SDL2_ttf Description: ttf library for Simple DirectMedia Layer with FreeType 2 support Version: 2.0.14 Requires: sdl2 >= 2.0.9 -Libs: ${NXDK_DIR}/lib/libSDL_ttf.lib ${NXDK_DIR}/lib/libfreetype.lib +Libs: -l${NXDK_DIR}/lib/libSDL_ttf.lib -l${NXDK_DIR}/lib/libfreetype.lib Cflags: -I${NXDK_DIR}/lib/sdl -I${NXDK_DIR}/lib/sdl/SDL_ttf diff --git a/lib/pkgconfig/libjpeg.pc b/lib/pkgconfig/libjpeg.pc index 89d524083..7f51085ea 100644 --- a/lib/pkgconfig/libjpeg.pc +++ b/lib/pkgconfig/libjpeg.pc @@ -1,5 +1,5 @@ Name: libjpeg Description: A SIMD-accelerated JPEG codec that provides the libjpeg API Version: 2.0.4 -Libs: ${NXDK_DIR}/lib/libjpeg.lib +Libs: -l${NXDK_DIR}/lib/libjpeg.lib Cflags: -I${NXDK_DIR}/lib/libjpeg/libjpeg-turbo -I${NXDK_DIR}/lib/libjpeg diff --git a/lib/pkgconfig/libpng.pc b/lib/pkgconfig/libpng.pc index f1998f786..d47053468 100644 --- a/lib/pkgconfig/libpng.pc +++ b/lib/pkgconfig/libpng.pc @@ -2,5 +2,5 @@ Name: libpng Description: Loads and saves PNG files Version: 1.6.37 Requires: zlib -Libs: ${NXDK_DIR}/lib/libpng.lib +Libs: -l${NXDK_DIR}/lib/libpng.lib Cflags: -I${NXDK_DIR}/lib/libpng -I${NXDK_DIR}/lib/libpng/libpng diff --git a/lib/pkgconfig/sdl2.pc b/lib/pkgconfig/sdl2.pc index 211cc5daa..8c6208b1a 100644 --- a/lib/pkgconfig/sdl2.pc +++ b/lib/pkgconfig/sdl2.pc @@ -3,5 +3,5 @@ Description: Simple DirectMedia Layer is a cross-platform multimedia library des Version: 2.0.9 Requires: Conflicts: -Libs: ${NXDK_DIR}/lib/libSDL2.lib +Libs: -l${NXDK_DIR}/lib/libSDL2.lib Cflags: -I${NXDK_DIR}/lib/sdl/SDL2/include -DXBOX diff --git a/lib/pkgconfig/zlib.pc b/lib/pkgconfig/zlib.pc index 62060c9bd..433d30d30 100644 --- a/lib/pkgconfig/zlib.pc +++ b/lib/pkgconfig/zlib.pc @@ -3,5 +3,5 @@ Description: zlib compression library Version: 1.2.11 Requires: -Libs: ${NXDK_DIR}/lib/libzlib.lib +Libs: -l${NXDK_DIR}/lib/libzlib.lib Cflags: -I${NXDK_DIR}/lib/zlib/zlib -DZ_SOLO