cgogolin / penandpdf

Pen&PDF is a PDF viewer and annotation app for Android built on top of MuPDF.
GNU Affero General Public License v3.0
65 stars 23 forks source link

Add to F-Droid #9

Open airon90 opened 6 years ago

airon90 commented 6 years ago

F-Droid is a store of FOSS apps for Android. As your app is licensed under GPL v3, could you list your app in F-Droid database? Thank you very much!

cgogolin commented 6 years ago

This would definitely be very cool! Unfortunately it is not entirely trivial because of dependencies (see also #5 for more information) and I cannot afford to work on this right now. Hopefully Pen&PDF will be on F-Droid in the future. Help is greatly appreciated!

Grossdm commented 6 years ago

It looks like it's time to close this issue - does everyone agree?

shawn1thompson commented 5 years ago

I disagree. I would definitely like to see it on F-Droid. Unfortunately, I have nothing to offer though.

cgogolin commented 5 years ago

Let's leave it open. Some day it might happen...

IzzySoft commented 5 years ago

For now it's in F-Droid's "nonfree" repo (mine) here for more then a year already. But I agree it would be a good idea to have this in the official repo. What dependencies do you mean that are stopping you, @cgogolin? I'm not a dev myself, so for me it's hard to say (especially if there's no gradle).

cgogolin commented 5 years ago

Pen&PDF is built on top of MuPDF and actually uses a version of the library with custom modifications that is in this repository. MuPDF in turn comes with a number of third party dependencies, which you can see here https://github.com/cgogolin/penandpdf/tree/master/thirdparty. All of them are directly included in this repository. I think one would first have to setup a gradle based build system, update all third party libraries, and check their licenses. I would love to to that, but simply don't have the time...

Rudloff commented 5 years ago

I see you are using submodules for dependencies, F-Droid can totally use that (as long as everything is built from source).

IzzySoft commented 5 years ago

A check cannot hurt. MuPDF is already in the official repo (MuPDF Viewer as well as MuPDF Mini; I've linked to my repo browser as it loads faster; for build recipes you'd need to check with F-Droid Metadata though), so you could cross-check what they did (also concerning those 3rd party dependencies). That also means it is possible.

cgogolin commented 5 years ago

I would really like to get Pen&PDF on F-Droid, but I think I am lacking the expertise to do this quickly and the time to learn all things necessary. If you guys know how to do it, I am more than happy to accept a PR.

Rudloff commented 5 years ago

We can take of writing the build recipe for you.

However I see the repository contains some prebuilt JAR files:

DEBUG: buildserver > WARNING: Found JAR file at platform/android/design/libs/android-support-design.jar
DEBUG: buildserver > WARNING: Found JAR file at platform/android/cardview/libs/android-support-v7-cardview.jar
DEBUG: buildserver > WARNING: Found JAR file at platform/android/appcompat/libs/android-support-v7-appcompat.jar
DEBUG: buildserver > WARNING: Found JAR file at platform/android/appcompat/libs/android-support-v4.jar
DEBUG: buildserver > WARNING: Found JAR file at platform/android/recyclerview/libs/android-support-v7-recyclerview.jar

We require those to be built from source or fetched from a trusted Maven/Gradle repository.

Also, I get this error when I run ndk-build:

DEBUG: buildserver > Android NDK: WARNING: APP_PLATFORM android-24 is larger than android:minSdkVersion 14 in ./AndroidManifest.xml
DEBUG: buildserver > Android NDK: WARNING:jni/Android.mk:mupdfcore: LOCAL_LDLIBS is always ignored for static libraries
DEBUG: buildserver > [armeabi-v7a] Compile thumb  : mupdf <= mupdf.c
DEBUG: buildserver > In file included from jni/mupdf.c:18:0:
DEBUG: buildserver > ../../include/mupdf/pdf.h:6:34: fatal error: mupdf/pdf/name-table.h: No such file or directory
DEBUG: buildserver >  #include "mupdf/pdf/name-table.h"
DEBUG: buildserver >                                   ^
DEBUG: buildserver > compilation terminated.
DEBUG: buildserver > /home/vagrant/android-ndk/r12b/build/core/build-binary.mk:472: recipe for target 'obj/local/armeabi-v7a/objs/mupdf/mupdf.o' failed
DEBUG: buildserver > make: *** [obj/local/armeabi-v7a/objs/mupdf/mupdf.o] Error 1

I suppose I am missing some prebuild step? (And which NDK version should we use?)

cgogolin commented 5 years ago

Thanks, that's great!

I think I know where the error is coming from, but I need an hour or two to look into this. Contrary to my other projects, for which I have constructed the build system from the ground up, the one of Pen&PDF is, unfortunately, a mess (mea culpa). I will try to clean this up and provide a working Makefile.

Being a "traditionalist" who tries to keep things as basic as possible, I have never worked with gradle and instead always used ant and ndk-build directly, so I have to look into this.

IzzySoft commented 5 years ago

@cgogolin just a heads-up: did you find a gap in your schedule to work on this?

cgogolin commented 5 years ago

Unfortunately not and I don't think I will. I fear I will no longer be able to maintain this app...

IzzySoft commented 5 years ago

That's sad. Shall I then close the RFP on our end? We can always re-open it if the situation changes.

cgogolin commented 5 years ago

It is sad, but I fear that's the right thing to do. Thank you.

IzzySoft commented 5 years ago

OK, done so. Should the situation change: Here's the RFP, just give us a ping (here or there) and we reopen it.

linsui commented 1 year ago

I ported it to gradle and update the libs to androidx. https://github.com/linsui/penandpdf/tree/gradle

But the problem is that it uses a very old mupdf which is insecure. I'm not sure if I should publish it to F-Droid in the current state. I don't know how to update it to latest mupdf.

Daniel-Ioannou commented 10 months ago

@linsui I recently came across your version where you've migrated it to Gradle and updated the libraries to AndroidX.

I tried to build the project, but I'm having some issues. Are there any specific scripts or steps I need to follow before building the project in Android Studio?

Your guidance would be immensely helpful in getting me started. Thank you in advance for your assistance, and I appreciate the effort you've put into updating the app.

linsui commented 10 months ago

You can take a look at https://gitlab.com/fdroid/fdroiddata/-/merge_requests/12390/diffs. I thought there is no special steps.