New package: libb64-1.2.1

This commit is contained in:
Đoàn Trần Công Danh 2023-08-21 21:31:03 +07:00
parent 28d206b3b5
commit 92e90f0dd4
7 changed files with 136 additions and 0 deletions

View File

@ -4328,3 +4328,4 @@ libdbi.so.1 libdbi-0.9.0_1
libchafa.so.0 libchafa-1.12.5_1
libcppdap.so cppdap-1.58.0+a_1
libkeyfinder.so.2 libkeyfinder-2.2.7_1
libb64.so.0 libb64-1.2.1_1

1
srcpkgs/libb64-devel Symbolic link
View File

@ -0,0 +1 @@
libb64

View File

@ -0,0 +1,27 @@
Description: make overriding CFLAGS possible
Author: Jakub Wilk <jwilk@debian.org>
Forwarded: no
Last-Update: 2012-11-30
--- a/base64/Makefile
+++ b/base64/Makefile
@@ -3,7 +3,7 @@ BINARIES = base64
# Build flags (uncomment one)
#############################
# Release build flags
-CFLAGS += -O3
+CFLAGS ?= -O3
#############################
# Debug build flags
#CFLAGS += -g
--- a/src/Makefile
+++ b/src/Makefile
@@ -3,7 +3,7 @@ LIBRARIES = libb64.a
# Build flags (uncomment one)
#############################
# Release build flags
-CFLAGS += -O3
+CFLAGS ?= -O3
#############################
# Debug build flags
#CFLAGS += -g

View File

@ -0,0 +1,44 @@
Description: use BUFSIZ as buffer size
Author: Jakub Wilk <jwilk@debian.org>
Bug: http://sourceforge.net/tracker/?func=detail&atid=785907&aid=3591336&group_id=152942
Forwarded: no
Last-Update: 2012-11-30
--- a/include/b64/decode.h
+++ b/include/b64/decode.h
@@ -8,6 +8,7 @@ For details, see http://sourceforge.net/
#ifndef BASE64_DECODE_H
#define BASE64_DECODE_H
+#include <cstdio>
#include <iostream>
namespace base64
@@ -22,7 +23,7 @@ namespace base64
base64_decodestate _state;
int _buffersize;
- decoder(int buffersize_in = BUFFERSIZE)
+ decoder(int buffersize_in = BUFSIZ)
: _buffersize(buffersize_in)
{}
--- a/include/b64/encode.h
+++ b/include/b64/encode.h
@@ -8,6 +8,7 @@ For details, see http://sourceforge.net/
#ifndef BASE64_ENCODE_H
#define BASE64_ENCODE_H
+#include <cstdio>
#include <iostream>
namespace base64
@@ -22,7 +23,7 @@ namespace base64
base64_encodestate _state;
int _buffersize;
- encoder(int buffersize_in = BUFFERSIZE)
+ encoder(int buffersize_in = BUFSIZ)
: _buffersize(buffersize_in)
{}

View File

@ -0,0 +1,31 @@
Description: initialize encoder/decoder state in the constructors
Author: Jakub Wilk <jwilk@debian.org>
Forwarded: no
Last-Update: 2013-01-11
--- a/include/b64/decode.h
+++ b/include/b64/decode.h
@@ -25,7 +25,9 @@ namespace base64
decoder(int buffersize_in = BUFSIZ)
: _buffersize(buffersize_in)
- {}
+ {
+ base64_init_decodestate(&_state);
+ }
int decode(char value_in)
{
--- a/include/b64/encode.h
+++ b/include/b64/encode.h
@@ -25,7 +25,9 @@ namespace base64
encoder(int buffersize_in = BUFSIZ)
: _buffersize(buffersize_in)
- {}
+ {
+ base64_init_encodestate(&_state);
+ }
int encode(char value_in)
{

32
srcpkgs/libb64/template Normal file
View File

@ -0,0 +1,32 @@
# Template file for 'libb64'
pkgname=libb64
version=1.2.1
revision=1
short_desc="Library for fast encoding/decoding data into and from Base64 format"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="Public Domain"
homepage="https://libb64.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/libb64/libb64-${version}.zip"
checksum=20106f0ba95cfd9c35a13c71206643e3fb3e46512df3e2efb2fdbf87116314b2
CFLAGS=-fPIC
do_build() {
make -C src
${CC} ${LDFLAGS} ${CFLAGS} \
-shared -Wl,-soname,libb64.so.0 \
src/*.o -o libb64.so.0
}
do_install() {
vinstall libb64.so.0 644 usr/lib
}
libb64-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
ln -sf libb64.so.0 "${PKGDESTDIR}/usr/lib/libb64.so"
vcopy include usr
vinstall src/libb64.a 644 usr/lib
}
}