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

Make fontpreview more portable & fix some bugs #28

Merged
merged 9 commits into from
Mar 8, 2020

Conversation

0mp
Copy link
Contributor

@0mp 0mp commented Feb 11, 2020

I am porting fontpreview to FreeBSD now and I've stumbled upon some issues (bugs & compatilibity issues).

Cheers! After those patches fontpreview is running very nicely on FreeBSD (the only drawback is that getopt is using some not so portable options so I have to patch fontpreview to use a non-FreeBSD getopt instead. I think that unless you want to change the way the command-line arguments are parsed, I am going to patch the fontpreview port on FreeBSD to use a different getopt (one coming from packages and not the one from the base system).

0mp and others added 9 commits February 11, 2020 10:42
- PREFIX is a much more standard variable than DEST.
- Add BINDIR to actually let people choose where to install fontpreview
  precisely if they need.
- Support DESTDIR, which is useful for staged package building.

While here, use tabs to indent values of variables. Spaces are sometimes
significant in makefiles (they are parts of the values), which might
lead to confusing bugs.
Also:
- Do not put random strings into files inside the fontpreview directory.
  They are already unique there.
- Exit with an error code if the program fails to create the temporary
  files.
The file name has to be the last argument. It was causing the following
errors:

    sxiv: -N: No such file or directory
    sxiv: fontpreview: No such file or directory
    sxiv: -b: No such file or directory
As fontpreview is now using Bash instead of POSIX sh(1), there is no
need to use single square brackets.
Procfs might not available on every platform. pgrep is much more
portable.
@sdushantha
Copy link
Owner

I will take a look at this after #13 has been completed

@0mp
Copy link
Contributor Author

0mp commented Feb 17, 2020

@sdushantha Cool, thanks!

fontpreview Show resolved Hide resolved
@sdushantha
Copy link
Owner

@0mp Hey, it looks like there is no activity in #13, so I guess I'll shift my focus to this PR 👍

@sdushantha
Copy link
Owner

Okay, everything looks good now and is ready to be merged 👍

@sdushantha sdushantha merged commit 04cb7c8 into sdushantha:master Mar 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants