libraries/cpprestsdk: Fix conflict with libwebsocketpp.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2022-03-04 03:11:05 -05:00 committed by Willy Sudiarto Raharjo
parent f6d065c39a
commit d6030887ff
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 13 additions and 14 deletions

View file

@ -22,6 +22,8 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220304 bkw: Modified by SlackBuilds.org: fix conflict with libwebsocketpp.
cd $(dirname $0) ; CWD=$(pwd) cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=cpprestsdk PRGNAM=cpprestsdk
@ -38,9 +40,6 @@ if [ -z "$ARCH" ]; then
esac esac
fi fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0 exit 0
@ -70,18 +69,21 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
rm -rf $PRGNAM-$VERSION rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION cd $PRGNAM-$VERSION
chown -R root:root . chown -R root:root .
find -L . \ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
# 20220304 bkw: explicitly disable websockets. attempting to build with
# libwebsocketpp installed will fail, otherwise.
mkdir -p Release/build mkdir -p Release/build
cd Release/build cd Release/build
cmake \ cmake \
-DCPPREST_EXCLUDE_WEBSOCKETS=ON \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -Wno-error=format-truncation=" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -Wno-error=format-truncation=" \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
@ -89,14 +91,11 @@ cd Release/build
-DCMAKE_INSTALL_LIBDIR=/usr/lib$LIBDIRSUFFIX \ -DCMAKE_INSTALL_LIBDIR=/usr/lib$LIBDIRSUFFIX \
-DCMAKE_BUILD_TYPE=Release .. -DCMAKE_BUILD_TYPE=Release ..
make make
make install DESTDIR=$PKG make install/strip DESTDIR=$PKG
cd ../.. cd -
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -ar CONTRIBUTORS.txt README.md ThirdPartyNotices.txt license.txt Release/samples \ cp -a CONTRIBUTORS.txt README.md ThirdPartyNotices.txt license.txt Release/samples \
$PKG/usr/doc/$PRGNAM-$VERSION $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

View file

@ -13,7 +13,7 @@ cpprestsdk: client-server communication in native code using a modern
cpprestsdk: asynchronous C++ API design. This project aims to help cpprestsdk: asynchronous C++ API design. This project aims to help
cpprestsdk: C++ developers connect to and interact with services. cpprestsdk: C++ developers connect to and interact with services.
cpprestsdk: cpprestsdk:
cpprestsdk: Homepage: https://github.com/Microsoft/cpprestsdk
cpprestsdk: cpprestsdk:
cpprestsdk: cpprestsdk:
cpprestsdk: https://github.com/Microsoft/cpprestsdk
cpprestsdk: cpprestsdk: