Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package request: psutils #2150

Closed
elpraga opened this issue Feb 16, 2018 · 6 comments
Closed

Package request: psutils #2150

elpraga opened this issue Feb 16, 2018 · 6 comments
Labels
package request A new package was requested

Comments

@elpraga
Copy link

elpraga commented Feb 16, 2018

I am really sorry, I've installed termux several hours ago, I was trying to find out if the package psutils (or even pdftk) can be installed in any way?

@tomty89
Copy link
Contributor

tomty89 commented Feb 16, 2018

Yeah you can install it from source:

$ tar -xf /sdcard/Download/psutils.tar.gz                                          
$ cd psutils/
$ mkdir -p $PREFIX/local/share/man                                                 
$ make PERL=$PREFIX/bin/perl BINDIR=$PREFIX/local/bin INCLUDEDIR=$PREFIX/local/include MANDIR=$PREFIX/local/share/man/man1 -f Makefile.unix install
gcc -DPAPER=\"a4\" -DUNIX -O -Wall   -c -o psbook.o psbook.c
psbook.c:35:1: warning: return type of 'main' is not 'int' [-Wmain-return-type]
void main(int argc, char *argv[])
^
psbook.c:35:1: note: change return type to 'int'
void main(int argc, char *argv[])
^~~~
int
1 warning generated.
gcc -DPAPER=\"a4\" -DUNIX -O -Wall   -c -o psutil.o psutil.c
gcc -DPAPER=\"a4\" -DUNIX -O -Wall   -c -o pserror.o pserror.c
pserror.c:27:10: warning: type specifier missing, defaults to 'int'
      [-Wimplicit-int]
  static column = 0 ;           /* current screen column for message wrap */
  ~~~~~~ ^
1 warning generated.
gcc  -o psbook psutil.o pserror.o psbook.o
gcc -DPAPER=\"a4\" -DUNIX -O -Wall   -c -o psselect.o psselect.c
psselect.c:94:1: warning: return type of 'main' is not 'int' [-Wmain-return-type]
void main(int argc, char *argv[])
^
psselect.c:94:1: note: change return type to 'int'
void main(int argc, char *argv[])
^~~~
int
1 warning generated.
gcc  -o psselect psutil.o pserror.o psselect.o
gcc -DPAPER=\"a4\" -DUNIX -O -Wall   -c -o pstops.o pstops.c
pstops.c:115:1: warning: return type of 'main' is not 'int' [-Wmain-return-type]
void main(int argc, char *argv[])
^
pstops.c:115:1: note: change return type to 'int'
void main(int argc, char *argv[])
^~~~
int
1 warning generated.
gcc -DPAPER=\"a4\" -DUNIX -O -Wall   -c -o psspec.o psspec.c
gcc  -o pstops psutil.o psspec.o pserror.o pstops.o
gcc -DPAPER=\"a4\" -DUNIX -O -Wall   -c -o epsffit.o epsffit.c
epsffit.c:42:1: warning: return type of 'main' is not 'int' [-Wmain-return-type]
void main(int argc, char **argv)
^
epsffit.c:42:1: note: change return type to 'int'
void main(int argc, char **argv)
^~~~
int
1 warning generated.
gcc  -o epsffit pserror.o epsffit.o
gcc -DPAPER=\"a4\" -DUNIX -O -Wall   -c -o psnup.o psnup.c
psnup.c:69:1: warning: return type of 'main' is not 'int' [-Wmain-return-type]
void main(int argc, char *argv[])
^
psnup.c:69:1: note: change return type to 'int'
void main(int argc, char *argv[])
^~~~
int
1 warning generated.
gcc  -o psnup psutil.o psspec.o pserror.o psnup.o
gcc -DPAPER=\"a4\" -DUNIX -O -Wall   -c -o psresize.o psresize.c
psresize.c:49:1: warning: return type of 'main' is not 'int' [-Wmain-return-type]
void main(int argc, char *argv[])
^
psresize.c:49:1: note: change return type to 'int'
void main(int argc, char *argv[])
^~~~
int
1 warning generated.
gcc  -o psresize psutil.o psspec.o pserror.o psresize.o
mkdir /data/data/com.termux/files/usr/local/bin
Installing psbook
Installing psselect
Installing pstops
Installing epsffit
Installing psnup
Installing psresize
/data/data/com.termux/files/usr/bin/perl maketext OS=UNIX PERL=/data/data/com.termux/files/usr/bin/perl fixfmps.pl > fixfmps
chmod 0755 fixfmps
/data/data/com.termux/files/usr/bin/perl maketext OS=UNIX PERL=/data/data/com.termux/files/usr/bin/perl INCLUDE=/data/data/com.termux/files/usr/local/include fixmacps.pl > fixmacps
chmod 0755 fixmacps
/data/data/com.termux/files/usr/bin/perl maketext OS=UNIX PERL=/data/data/com.termux/files/usr/bin/perl fixpsditps.pl > fixpsditps
chmod 0755 fixpsditps
/data/data/com.termux/files/usr/bin/perl maketext OS=UNIX PERL=/data/data/com.termux/files/usr/bin/perl fixpspps.pl > fixpspps
chmod 0755 fixpspps
/data/data/com.termux/files/usr/bin/perl maketext OS=UNIX PERL=/data/data/com.termux/files/usr/bin/perl fixtpps.pl > fixtpps
chmod 0755 fixtpps
/data/data/com.termux/files/usr/bin/perl maketext OS=UNIX PERL=/data/data/com.termux/files/usr/bin/perl fixwfwps.pl > fixwfwps
chmod 0755 fixwfwps
/data/data/com.termux/files/usr/bin/perl maketext OS=UNIX PERL=/data/data/com.termux/files/usr/bin/perl fixwpps.pl > fixwpps
chmod 0755 fixwpps
/data/data/com.termux/files/usr/bin/perl maketext OS=UNIX PERL=/data/data/com.termux/files/usr/bin/perl fixscribeps.pl > fixscribeps
chmod 0755 fixscribeps
/data/data/com.termux/files/usr/bin/perl maketext OS=UNIX PERL=/data/data/com.termux/files/usr/bin/perl fixwwps.pl > fixwwps
chmod 0755 fixwwps
/data/data/com.termux/files/usr/bin/perl maketext OS=UNIX PERL=/data/data/com.termux/files/usr/bin/perl fixdlsrps.pl > fixdlsrps
chmod 0755 fixdlsrps
/data/data/com.termux/files/usr/bin/perl maketext OS=UNIX PERL=/data/data/com.termux/files/usr/bin/perl extractres.pl > extractres
chmod 0755 extractres
/data/data/com.termux/files/usr/bin/perl maketext OS=UNIX PERL=/data/data/com.termux/files/usr/bin/perl INCLUDE=/data/data/com.termux/files/usr/local/include includeres.pl > includeres
chmod 0755 includeres
/data/data/com.termux/files/usr/bin/perl maketext OS=UNIX PERL=/data/data/com.termux/files/usr/bin/perl psmerge.pl > psmerge
chmod 0755 psmerge
cp getafm.sh getafm
cp showchar.sh showchar
mkdir /data/data/com.termux/files/usr/local/bin
mkdir: can't create directory '/data/data/com.termux/files/usr/local/bin': File exists
make: [Makefile.unix:229: install.script] Error 1 (ignored)
Installing fixfmps
Installing fixmacps
Installing fixpsditps
Installing fixpspps
Installing fixtpps
Installing fixwfwps
Installing fixwpps
Installing fixscribeps
Installing fixwwps
Installing fixdlsrps
Installing extractres
Installing includeres
Installing psmerge
Installing getafm
Installing showchar
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" psbook.man > psbook.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" psselect.man > psselect.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" PAPER=a4 pstops.man > pstops.1
/data/data/com.termux/files/usr/bin/perl maketext MAN="psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" epsffit.man > epsffit.1
/data/data/com.termux/files/usr/bin/perl maketext MAN="psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" PAPER=a4 psnup.man > psnup.1
/data/data/com.termux/files/usr/bin/perl maketext MAN="psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" PAPER=a4 psresize.man > psresize.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" psmerge.man > psmerge.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" fixscribeps.man > fixscribeps.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" getafm.man > getafm.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" fixdlsrps.man > fixdlsrps.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" fixfmps.man > fixfmps.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" INCLUDE=/data/data/com.termux/files/usr/local/include fixmacps.man > fixmacps.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" fixpsditps.man > fixpsditps.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" fixpspps.man > fixpspps.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" fixtpps.man > fixtpps.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" fixwfwps.man > fixwfwps.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" fixwpps.man > fixwpps.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" fixwwps.man > fixwwps.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" extractres.man > extractres.1
/data/data/com.termux/files/usr/bin/perl maketext "MAN=psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 psmerge.1 fixscribeps.1 getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 extractres.1 includeres.1" INCLUDE=/data/data/com.termux/files/usr/local/include includeres.man > includeres.1
mkdir /data/data/com.termux/files/usr/local/share/man/man1
Installing manual page for psbook.1
Installing manual page for psselect.1
Installing manual page for pstops.1
Installing manual page for epsffit.1
Installing manual page for psnup.1
Installing manual page for psresize.1
Installing manual page for psmerge.1
Installing manual page for fixscribeps.1
Installing manual page for getafm.1
Installing manual page for fixdlsrps.1
Installing manual page for fixfmps.1
Installing manual page for fixmacps.1
Installing manual page for fixpsditps.1
Installing manual page for fixpspps.1
Installing manual page for fixtpps.1
Installing manual page for fixwfwps.1
Installing manual page for fixwpps.1
Installing manual page for fixwwps.1
Installing manual page for extractres.1
Installing manual page for includeres.1
mkdir /data/data/com.termux/files/usr/local/include
Installing md68_0.ps
Installing md71_0.ps
$

You probably need clang, make and perl.

Don't think you can have pdftk coz it's written in Java, and gcj is not available in Termux. There are a few other pdf utilities packages though:

$ pkg search pdf
Hit:1 https://termux.net stable InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Sorting... Done
Full Text Search... Done
ghostscript/stable 9.22-1 aarch64
  Interpreter for the PostScript language and for PDF

poppler/stable 0.62.0-1 aarch64
  PDF rendering library

qpdf/stable 7.1.1 aarch64
  A Content-Preserving PDF Transformation System

qpdf-dev/stable 7.1.1 aarch64
  Development files for qpdf

$

@elpraga
Copy link
Author

elpraga commented Feb 16, 2018

Thank you so much @tomty89 for your help! I'll let you know If I managed to compile it.

BTW, why do you mention that I'll need clang? Didn't you use gcc?

@tomty89
Copy link
Contributor

tomty89 commented Feb 16, 2018

Nope only clang is available in Termux (which pretends to be gcc).

@fornwall fornwall added the package request A new package was requested label Feb 17, 2018
@fornwall fornwall changed the title Can psutils be installed in any way? Package request: psutils Feb 17, 2018
@elpraga
Copy link
Author

elpraga commented Feb 17, 2018

All done! Thank you so much @tomty89 !

Here is the result: https://github.com/elpraga/Termux-tools As far as I know, it is the only way how to 2-up a PDF directly and easily on Android.

ghost pushed a commit that referenced this issue Jan 4, 2020
Requested in #2150.
@ghost
Copy link

ghost commented Jan 4, 2020

Package is now available.

You can obtain it with these commands:

pkg install psutils

@ghost ghost closed this as completed Jan 4, 2020
@ghost ghost deleted a comment from adamtaha Jan 4, 2020
@ghost ghost deleted a comment from adamtaha Jan 4, 2020
@repleeka
Copy link

can't run psutil programs on termux.
permission denied.

@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package request A new package was requested
Projects
None yet
Development

No branches or pull requests

4 participants