libpaper ver. bump

This commit is contained in:
Rmys
2023-07-29 20:37:56 +03:00
parent 4df8b40b7a
commit ee8d445428
3 changed files with 63 additions and 1 deletions
+5
View File
@@ -19,9 +19,14 @@ def setup():
def build():
autotools.make()
shelltools.cd("src")
shelltools.system("gcc $CFLAGS $LDFLAGS -I.. -Ilibgnu -o localepaper localepaper.c libgnu/.libs/libgnupaper.a")
def install():
autotools.install()
pisitools.dolib("src/localepaper")
for lang in shelltools.ls("debian/po/*.po"):
pisitools.domo(lang, shelltools.baseName(lang).replace(".po", ""), "libpaper.mo")
@@ -0,0 +1,44 @@
/*
* localepaper: print the dimensions in mm of the current locale's
* paper size, if possible.
*
* Based on a patch by Caolan McNamara:
* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481213
*
* Copyright (C) Reuben Thomas <rrt@sc3d.org>, 2013.
*
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
* notice and this notice are preserved.
*/
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#if defined LC_PAPER && defined _GNU_SOURCE
#include <langinfo.h>
#endif
#include "progname.h"
int main(int argc, char *argv[])
{
set_program_name(argv[0]);
argc = argc; /* Avoid a compiler warning. */
#if defined LC_PAPER && defined _GNU_SOURCE
setlocale(LC_ALL, "");
#define NL_PAPER_GET(x) \
((union { char *string; unsigned word; })nl_langinfo(x)).word
printf("%d %d\n", NL_PAPER_GET(_NL_PAPER_WIDTH), NL_PAPER_GET(_NL_PAPER_HEIGHT));
return EXIT_SUCCESS;
#else
printf("%s: locale paper size information is not supported on this system", program_name);
return EXIT_FAILURE;
#endif
}
+14 -1
View File
@@ -12,7 +12,10 @@
<IsA>library</IsA>
<Summary>Library for handling paper characteristics</Summary>
<Description>Libpaper is a programming library for handling paper characteristics.</Description>
<Archive sha1sum="c6583fbdaebe091d11d81c4e59514e58996f22ba" type="targz">http://ftp.debian.org/debian/pool/main/libp/libpaper/libpaper_1.1.28.tar.gz</Archive>
<Archive sha1sum="cb7704d9461323fe60da5f822f18f9cb83cfc246" type="targz">https://github.com/rrthomas/libpaper/releases/download/v2.1.1/libpaper-2.1.1.tar.gz</Archive>
<AdditionalFiles>
<AdditionalFile target="src/localepaper.c">fedora/localepaper.c</AdditionalFile>
</AdditionalFiles>
<Patches>
<!-- <Patch level="1">libpaper-1.1.23-debianbug475683.patch</Patch>
<Patch level="1">libpaper-useglibcfallback.patch</Patch>-->
@@ -21,6 +24,9 @@
<Package>
<Name>libpaper</Name>
<Replaces>
<Package>paper</Package>
</Replaces>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="executable">/usr/sbin</Path>
@@ -48,6 +54,13 @@
</Package>
<History>
<Update release="8">
<Date>2023-07-28</Date>
<Version>2.1.1</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="7">
<Date>2021-07-16</Date>
<Version>1.1.28</Version>