Blame docker-builder-data/build/script/packet/glew-2.0.0.sh

1b5f3d
DEPS=""
1b5f3d
1b5f3d
PK_DIRNAME="glew-2.0.0"
e14835
PK_ARCHIVE="$PK_DIRNAME.tgz"
e14835
PK_URL="https://sourceforge.net/projects/glew/files/glew/2.0.0/$PK_ARCHIVE/download"
1b5f3d
99b145
source $INCLUDE_SCRIPT_DIR/inc-pkall-default.sh
1b5f3d
1b5f3d
pkbuild() {
e14835
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME"
e14835
    
cf8c28
    if [ "$PLATFORM" = "win" ]; then
cf8c28
cat > "config/Makefile.mingw-$PLATFORM-$ARCH" << EOF
cf8c28
NAME          := glew32
cf8c28
HOST          := $HOST
cf8c28
CC            := $CC
cf8c28
LD            := $LD
cf8c28
LN            :=
cf8c28
STRIP         :=
cf8c28
LDFLAGS.GL     = -lopengl32 -lgdi32 -luser32 -lkernel32 $LDFLAGS
cf8c28
CFLAGS.EXTRA  += -fno-builtin -fno-stack-protector
cf8c28
WARN           = -Wall -W
cf8c28
POPT           = -O2
cf8c28
BIN.SUFFIX     = .exe
cf8c28
LIB.SONAME     = lib\$(NAME).dll
cf8c28
LIB.DEVLNK     = lib\$(NAME).dll.a
cf8c28
LIB.SHARED     = \$(NAME).dll
cf8c28
LIB.STATIC     = lib\$(NAME).a
cf8c28
LDFLAGS.SO     = -shared -soname \$(LIB.SONAME) --out-implib lib/\$(LIB.DEVLNK)
cf8c28
EOF
cf8c28
        
cf8c28
        if ! GLEW_PREFIX=$INSTALL_PACKET_DIR GLEW_DEST=$INSTALL_PACKET_DIR SYSTEM=mingw-$PLATFORM-$ARCH make -j${THREADS}; then
cf8c28
            return 1
cf8c28
        fi
cf8c28
    else
cf8c28
        if ! GLEW_PREFIX=$INSTALL_PACKET_DIR GLEW_DEST=$INSTALL_PACKET_DIR make -j${THREADS}; then
cf8c28
            return 1
cf8c28
        fi
1b5f3d
    fi
1b5f3d
}
1b5f3d
1b5f3d
pkinstall() {
e14835
    cd "$BUILD_PACKET_DIR/$PK_DIRNAME"
cf8c28
    if [ "$PLATFORM" = "win" ]; then
cf8c28
        if ! GLEW_PREFIX=$INSTALL_PACKET_DIR GLEW_DEST=$INSTALL_PACKET_DIR SYSTEM=mingw-$PLATFORM-$ARCH make install; then
cf8c28
            return 1
cf8c28
        fi
cf8c28
    else
cf8c28
        if ! GLEW_PREFIX=$INSTALL_PACKET_DIR GLEW_DEST=$INSTALL_PACKET_DIR make install; then
cf8c28
            return 1
cf8c28
        fi
1b5f3d
    fi
1b5f3d
}