diff --git a/pkg.info b/pkg.info index 7a81a1d..e42a779 100644 --- a/pkg.info +++ b/pkg.info @@ -1,10 +1,19 @@ name: ncurses description: System V Release 4.0 curses emulation library -version: 6.5 +version: "6.6" +revision: 1 url: https://invisible-island.net/ncurses/ncurses.html license: MIT-open-group architecture: any -depends: ["glibc"] -optional_depends: ["bash"] -make_depends: ["gcc"] type: source +depends: + - glibc +optional_depends: + - bash +make_depends: + - gcc +downloads: + - url: https://ftpmirror.gnu.org/gnu/ncurses/ncurses-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 355b4cbbed880b0381a04c46617b7656e362585d52e9cf84a67e2009b749ff11 diff --git a/source.sh b/source.sh index e0fe20f..786adfd 100644 --- a/source.sh +++ b/source.sh @@ -2,24 +2,9 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT -DOWNLOAD="https://ftpmirror.gnu.org/gnu/ncurses/ncurses-${BPM_PKG_VERSION}.tar.gz" -FILENAME="${DOWNLOAD##*/}" - -# The prepare function is executed in the root of the temp directory -# This function is used for downloading files and putting them into the correct location -prepare() { - wget "$DOWNLOAD" - tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" - - cd "$BPM_SOURCE" - patch -Np1 -i "$BPM_WORKDIR"/ncurses-6.3-libs.patch # Do not link against test libraries - patch -Np1 -i "$BPM_WORKDIR"/ncurses-6.3-pkgconfig.patch # Do not leak build-time LDFLAGS into the pkgconfig files -} - # The build function is executed in the source directory # This function is used to compile the source code build() { - export CFLAGS="${CFLAGS} --std=gnu17" ./configure --prefix=/usr \ --mandir=/usr/share/man \ --with-shared \ @@ -32,24 +17,27 @@ build() { make } -# The check function is executed in the source directory -# This function is used to run tests to verify the package has been compiled correctly -check() { - make check -} - # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { make DESTDIR="$BPM_OUTPUT" install + + # Ensure wide-character ABI is used sed -e 's/^#if.*XOPEN.*$/#if 1/' -i "$BPM_OUTPUT"/usr/include/curses.h + + # Symlink libraries for compatibility with applications that use non-wide character ncurses libraries for lib in ncurses form panel menu ; do ln -sfv lib${lib}w.so "$BPM_OUTPUT"/usr/lib/lib${lib}.so ln -sfv ${lib}w.pc "$BPM_OUTPUT"/usr/lib/pkgconfig/${lib}.pc done + + # Symlink libcurses for compatibility with older applications ln -sfv libncursesw.so "$BPM_OUTPUT"/usr/lib/libcurses.so - mkdir -p "$BPM_OUTPUT"/usr/share/doc/ncurses/ - cp -v -R doc -T "$BPM_OUTPUT"/usr/share/doc/ncurses - mkdir -p "$BPM_OUTPUT"/usr/share/licenses/ncurses - cp COPYING "$BPM_OUTPUT"/usr/share/licenses/ncurses/ + + # Install documentation + install -d "$BPM_OUTPUT"/usr/share/doc/ncurses/ + cp -R doc -T "$BPM_OUTPUT"/usr/share/doc/ncurses + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/ncurses/COPYING }