summaryrefslogtreecommitdiff
path: root/libs/giflib/MAKEPKG.old
blob: 47cdf1cfd774579dd918b0de2696cd1c8984ef18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/mkpkg
# description: Library for reading and writing GIF images
# url: https://giflib.sourceforge.net

name=giflib
version=5.2.2
release=1
source=(https://downloads.sourceforge.net/sourceforge/giflib/giflib-5.2.2.tar.gz
        giflib-5.2.2-cve-2025-31344.patch)

sha256sums=(
    "be7ffbd057cadebe2aa144542fd90c6838c6a083b5e8a9048b8ee3b66b29d5fb"
    "7afc208059dd0860953ce246c6af7b0617b85fd41f273d9c3a4974acaa90bec2"
)

build() {
    cd ${name}-${version}

    # CVE-2025-31344: heap overflow in gif2rgb
    patch -Np1 -i $SRC/giflib-5.2.2-cve-2025-31344.patch

    # Remove doc build from all target (needs ImageMagick convert)
    sed -i '/-C doc/d' Makefile

    # Install prebuilt man pages instead of xml sources
    sed -e 's|giflib.xml|giflib.7|' \
        -re 's|doc/(.*).xml|doc/\1.1|g' \
        -i Makefile

    make CC=cc PREFIX=/usr
    make PREFIX=/usr DESTDIR=$PKG install

    install -d $PKG/usr/share/man/man7
    mv $PKG/usr/share/man/man1/giflib.7 $PKG/usr/share/man/man7/

    rm -f $PKG/usr/lib/libgif.a
}

signify() {
    untrusted comment: public key
    RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
}

# vim: filetype=sh