libraries/aribb25: Updated for version 0.2.7.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Vijay Marcel 2024-02-17 07:58:15 +09:00 committed by Willy Sudiarto Raharjo
parent 179194419e
commit 0ee30faaf2
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 326 additions and 18 deletions

View file

@ -2,7 +2,7 @@
# Slackware build script for aribb25 # Slackware build script for aribb25
# Copyright 2022 Vijay Marcel # Copyright 2022-2024 Vijay Marcel
# All rights reserved. # All rights reserved.
# #
# Redistribution and use of this script, with or without modification, is # Redistribution and use of this script, with or without modification, is
@ -25,12 +25,10 @@
cd $(dirname $0) ; CWD=$(pwd) cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=aribb25 PRGNAM=aribb25
VERSION=${VERSION:-c1493869_20180207} VERSION=${VERSION:-0.2.7}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz} PKGTYPE=${PKGTYPE:-tgz}
LONGNAM=${LONGNAM:-c1493869-c14938692b313b5ba953543fd94fd1cad0eeef18}
if [ -z "$ARCH" ]; then if [ -z "$ARCH" ]; then
case "$( uname -m )" in case "$( uname -m )" in
@ -40,9 +38,6 @@ case "$( uname -m )" in
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
@ -53,13 +48,13 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp} OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686" SLKCFLAGS="-march=i586 -mtune=i686 -pipe -O2 -fPIC"
LIBDIRSUFFIX="" LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686" SLKCFLAGS="-march=i686 -mtune=i686 -pipe -O2 -fPIC"
LIBDIRSUFFIX="" LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC" SLKCFLAGS="-march=x86-64 -mtune=generic -pipe -O2 -fPIC"
LIBDIRSUFFIX="64" LIBDIRSUFFIX="64"
else else
SLKCFLAGS="-O2" SLKCFLAGS="-O2"
@ -72,9 +67,9 @@ trap 'echo "$0 FAILED at line $LINENO!" | tee -a $OUTPUT/error-${PRGNAM}.log' ER
rm -rf $PKG rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
rm -rf $PRGNAM-$LONGNAM rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$LONGNAM.tar.gz tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$LONGNAM 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 \
@ -82,9 +77,11 @@ find -L . \
\( -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 {} \;
patch -p1 --unified --verbose < $CWD/fix-libs.patch
./bootstrap
CFLAGS="$SLKCFLAGS" \ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \
./bootstrap
./configure \ ./configure \
--prefix=/usr \ --prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \ --libdir=/usr/lib${LIBDIRSUFFIX} \
@ -100,7 +97,7 @@ make install DESTDIR=$PKG
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ 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 | cut -f 1 -d : | xargs strip --strip-unneeded --remove-section=.comment --remove-section=.note 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENCE README.md README.jp.txt $PKG/usr/doc/$PRGNAM-$VERSION cp -a LICENCE README.md README.jp.txt $PKG/usr/doc/$PRGNAM-$VERSION

View file

@ -1,8 +1,8 @@
PRGNAM="aribb25" PRGNAM="aribb25"
VERSION="c1493869_20180207" VERSION="0.2.7"
HOMEPAGE="https://code.videolan.org/videolan/aribb25" HOMEPAGE="https://code.videolan.org/videolan/aribb25"
DOWNLOAD="https://code.videolan.org/videolan/aribb25/-/archive/c1493869/aribb25-c1493869-c14938692b313b5ba953543fd94fd1cad0eeef18.tar.gz" DOWNLOAD="https://code.videolan.org/videolan/aribb25/-/archive/0.2.7/aribb25-0.2.7.tar.gz"
MD5SUM="ec361907a5e0568582d3cdbbb6b6a5fe" MD5SUM="e5f889b7103af38417bbe8a707f926d1"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="pcsc-lite" REQUIRES="pcsc-lite"

View file

@ -0,0 +1,311 @@
diff --git a/.gitignore b/.gitignore
index fb6efca..1651fae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
/aclocal.m4
/aribb25-*/
/autom4te.cache
+/b25
/compile
/config.guess
/config.h
@@ -25,4 +26,7 @@
/m4/
/missing
/src/aribb25.pc
+/src/config.h
+/src/config.h.in
+/src/stamp-h1
/stamp-h1
diff --git a/Makefile.am b/Makefile.am
index b95a569..0cf8e51 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,10 +3,10 @@ ACLOCAL_AMFLAGS = -I m4
lib_LTLIBRARIES = libaribb25.la
libaribb25_la_SOURCES = src/arib_std_b25.c src/b_cas_card.c src/multi2.c \
src/portable.h src/ts_section_parser.c src/arib_std_b25_error_code.h \
- src/b_cas_card_error_code.h src/multi2_error_code.h src/td.c \
+ src/b_cas_card_error_code.h src/multi2_error_code.h \
src/ts_section_parser_error_code.h src/arib_std_b25.h src/b_cas_card.h \
src/multi2.h src/ts_common_types.h src/ts_section_parser.h src/aribb25api.h
-libaribb25_la_LIBADD = $(AM_LIBS) $(pcsclite_CFLAGS) $(PCSC_LIBS)
+libaribb25_la_LIBADD = $(AM_LIBS) $(pcsclite_LIBS) $(PCSC_LIBS)
libaribb25_la_CFLAGS = $(AM_CFLAGS) -Wall -Werror -fvisibility=hidden $(pcsclite_CFLAGS)
pkginclude_HEADERS = src/arib_std_b25_error_code.h src/b_cas_card_error_code.h \
@@ -17,4 +17,9 @@ pkginclude_HEADERS = src/arib_std_b25_error_code.h src/b_cas_card_error_code.h \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = src/aribb25.pc
+bin_PROGRAMS = b25
+b25_SOURCES = src/td.c
+b25_CFLAGS = $(AM_CFLAGS) -Wall -Werror $(pcsclite_CFLAGS)
+b25_LDADD = libaribb25.la $(pcsclite_LIBS) $(PCSC_LIBS)
+
dist_doc_DATA = README.jp.txt README.md LICENCE
diff --git a/configure.ac b/configure.ac
index ec1d35f..baa856e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,5 +82,6 @@ AS_IF([test "$SYS" = mingw32],[
], [AC_MSG_ERROR([${pcsclite_PKG_ERRORS}.])])
])
+AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_FILES([Makefile src/aribb25.pc])
AC_OUTPUT
diff --git a/src/arib_std_b25.h b/src/arib_std_b25.h
index 7edfbb3..a577731 100644
--- a/src/arib_std_b25.h
+++ b/src/arib_std_b25.h
@@ -16,8 +16,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*******************************************************************************/
-#ifndef ARIB_STD_B25_H
-#define ARIB_STD_B25_H
+#ifndef B25_ARIB_STD_B25_H
+#define B25_ARIB_STD_B25_H
#include "aribb25api.h"
#include "portable.h"
@@ -79,5 +79,5 @@ ARIBB25API ARIB_STD_B25 *create_arib_std_b25();
}
#endif
-#endif /* ARIB_STD_B25_H */
+#endif /* B25_ARIB_STD_B25_H */
diff --git a/src/arib_std_b25_error_code.h b/src/arib_std_b25_error_code.h
index 12a2e03..10d0a09 100644
--- a/src/arib_std_b25_error_code.h
+++ b/src/arib_std_b25_error_code.h
@@ -16,8 +16,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*******************************************************************************/
-#ifndef ARIB_STD_B25_ERROR_CODE_H
-#define ARIB_STD_B25_ERROR_CODE_H
+#ifndef B25_ARIB_STD_B25_ERROR_CODE_H
+#define B25_ARIB_STD_B25_ERROR_CODE_H
#define ARIB_STD_B25_ERROR_INVALID_PARAM -1
#define ARIB_STD_B25_ERROR_NO_ENOUGH_MEMORY -2
@@ -40,4 +40,4 @@ PERFORMANCE OF THIS SOFTWARE.
#define ARIB_STD_B25_WARN_TS_SECTION_ID_MISSMATCH 2
#define ARIB_STD_B25_WARN_BROKEN_TS_SECTION 3
-#endif /* ARIB_STD_B25_ERROR_CODE_H */
+#endif /* B25_ARIB_STD_B25_ERROR_CODE_H */
diff --git a/src/aribb25api.h b/src/aribb25api.h
index 2f47f7d..23f1bce 100644
--- a/src/aribb25api.h
+++ b/src/aribb25api.h
@@ -16,8 +16,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*******************************************************************************/
-#ifndef ARIBB25API_H
-#define ARIBB25API_H 1
+#ifndef B25_ARIBB25API_H
+#define B25_ARIBB25API_H 1
/* If building or using aribb25 as a DLL, define ARIBB25_DLL.
* */
@@ -54,4 +54,4 @@ PERFORMANCE OF THIS SOFTWARE.
#endif
#endif
-#endif
+#endif /* B25_ARIBB25API_H */
diff --git a/src/b_cas_card.h b/src/b_cas_card.h
index 37b65ab..6f49941 100644
--- a/src/b_cas_card.h
+++ b/src/b_cas_card.h
@@ -16,8 +16,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*******************************************************************************/
-#ifndef B_CAS_CARD_H
-#define B_CAS_CARD_H
+#ifndef B25_B_CAS_CARD_H
+#define B25_B_CAS_CARD_H
#include "aribb25api.h"
#include "portable.h"
@@ -91,4 +91,4 @@ ARIBB25API B_CAS_CARD *create_b_cas_card();
}
#endif
-#endif /* B_CAS_CARD_H */
+#endif /* B25_B_CAS_CARD_H */
diff --git a/src/b_cas_card_error_code.h b/src/b_cas_card_error_code.h
index 83802a4..c24d86a 100644
--- a/src/b_cas_card_error_code.h
+++ b/src/b_cas_card_error_code.h
@@ -16,8 +16,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*******************************************************************************/
-#ifndef B_CAS_CARD_ERROR_CODE_H
-#define B_CAS_CARD_ERROR_CODE_H
+#ifndef B25_B_CAS_CARD_ERROR_CODE_H
+#define B25_B_CAS_CARD_ERROR_CODE_H
#define B_CAS_CARD_ERROR_INVALID_PARAMETER -1
#define B_CAS_CARD_ERROR_NOT_INITIALIZED -2
@@ -26,4 +26,4 @@ PERFORMANCE OF THIS SOFTWARE.
#define B_CAS_CARD_ERROR_NO_ENOUGH_MEMORY -5
#define B_CAS_CARD_ERROR_TRANSMIT_FAILED -6
-#endif /* B_CAS_CARD_ERROR_CODE_H */
+#endif /* B25_B_CAS_CARD_ERROR_CODE_H */
diff --git a/src/multi2.h b/src/multi2.h
index 5708b7c..19ef922 100644
--- a/src/multi2.h
+++ b/src/multi2.h
@@ -16,8 +16,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*******************************************************************************/
-#ifndef MULTI2_H
-#define MULTI2_H
+#ifndef B25_MULTI2_H
+#define B25_MULTI2_H
#include "aribb25api.h"
#include "portable.h"
@@ -51,4 +51,4 @@ ARIBB25API MULTI2 *create_multi2();
}
#endif
-#endif /* MULTI2_H */
+#endif /* B25_MULTI2_H */
diff --git a/src/multi2_error_code.h b/src/multi2_error_code.h
index f1ca9e6..dcc30ef 100644
--- a/src/multi2_error_code.h
+++ b/src/multi2_error_code.h
@@ -16,12 +16,12 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*******************************************************************************/
-#ifndef MULTI2_ERROR_CODE_H
-#define MULTI2_ERROR_CODE_H
+#ifndef B25_MULTI2_ERROR_CODE_H
+#define B25_MULTI2_ERROR_CODE_H
#define MULTI2_ERROR_INVALID_PARAMETER -1
#define MULTI2_ERROR_UNSET_SYSTEM_KEY -2
#define MULTI2_ERROR_UNSET_CBC_INIT -3
#define MULTI2_ERROR_UNSET_SCRAMBLE_KEY -4
-#endif /* MULTI2_ERROR_CODE_H */
+#endif /* B25_MULTI2_ERROR_CODE_H */
diff --git a/src/portable.h b/src/portable.h
index 7e5f828..b9d5af7 100644
--- a/src/portable.h
+++ b/src/portable.h
@@ -16,8 +16,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*******************************************************************************/
-#ifndef PORTABLE_H
-#define PORTABLE_H
+#ifndef B25_PORTABLE_H
+#define B25_PORTABLE_H
#include <stdint.h>
@@ -38,4 +38,4 @@ PERFORMANCE OF THIS SOFTWARE.
#define _S_IWRITE (S_IWUSR|S_IWGRP|S_IWOTH)
#endif
-#endif /* PORTABLE_H */
+#endif /* B25_PORTABLE_H */
diff --git a/src/td.c b/src/td.c
index c27201f..288aa5a 100644
--- a/src/td.c
+++ b/src/td.c
@@ -37,6 +37,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "arib_std_b25.h"
#include "b_cas_card.h"
+#include "config.h"
typedef struct {
int32_t round;
@@ -85,7 +86,7 @@ int main(int argc, char **argv)
static void show_usage()
{
- fprintf(stderr, "b25 - ARIB STD-B25 test program ver. 0.2.5 (2012, 2/13)\n");
+ fprintf(stderr, "%s\n", PACKAGE_STRING);
fprintf(stderr, "usage: b25 [options] src.m2t dst.m2t [more pair ..]\n");
fprintf(stderr, "options:\n");
fprintf(stderr, " -r round (integer, default=4)\n");
diff --git a/src/ts_common_types.h b/src/ts_common_types.h
index 67830f4..67b4da3 100644
--- a/src/ts_common_types.h
+++ b/src/ts_common_types.h
@@ -16,8 +16,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*******************************************************************************/
-#ifndef TS_COMMON_TYPES_H
-#define TS_COMMON_TYPES_H
+#ifndef B25_TS_COMMON_TYPES_H
+#define B25_TS_COMMON_TYPES_H
#include "portable.h"
@@ -51,4 +51,4 @@ typedef struct {
uint8_t *tail;
} TS_SECTION;
-#endif /* TS_COMMON_TYPES_H */
\ No newline at end of file
+#endif /* B25_TS_COMMON_TYPES_H */
diff --git a/src/ts_section_parser.h b/src/ts_section_parser.h
index fdad1e2..2450d41 100644
--- a/src/ts_section_parser.h
+++ b/src/ts_section_parser.h
@@ -16,8 +16,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*******************************************************************************/
-#ifndef TS_SECTION_PARSER_H
-#define TS_SECTION_PARSER_H
+#ifndef B25_TS_SECTION_PARSER_H
+#define B25_TS_SECTION_PARSER_H
#include "aribb25api.h"
#include "ts_common_types.h"
@@ -56,4 +56,4 @@ ARIBB25API TS_SECTION_PARSER *create_ts_section_parser();
}
#endif
-#endif /* TS_SECTION_PARSER_H */
+#endif /* B25_TS_SECTION_PARSER_H */
diff --git a/src/ts_section_parser_error_code.h b/src/ts_section_parser_error_code.h
index 67bbec9..6626e1f 100644
--- a/src/ts_section_parser_error_code.h
+++ b/src/ts_section_parser_error_code.h
@@ -16,8 +16,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*******************************************************************************/
-#ifndef TS_SECTION_PARSER_ERROR_CODE_H
-#define TS_SECTION_PARSER_ERROR_CODE_H
+#ifndef B25_TS_SECTION_PARSER_ERROR_CODE_H
+#define B25_TS_SECTION_PARSER_ERROR_CODE_H
#define TS_SECTION_PARSER_ERROR_INVALID_PARAM -1
#define TS_SECTION_PARSER_ERROR_NO_ENOUGH_MEMORY -2
@@ -27,4 +27,4 @@ PERFORMANCE OF THIS SOFTWARE.
#define TS_SECTION_PARSER_WARN_CRC_MISSMATCH 1
#define TS_SECTION_PARSER_WARN_LENGTH_MISSMATCH 2
-#endif /* TS_SECTION_PARSER_ERROR_CODE_H */
+#endif /* B25_TS_SECTION_PARSER_ERROR_CODE_H */