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
gourou: init at 0.7.2 #179678
Closed
+135
−0
Closed
gourou: init at 0.7.2 #179678
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/bytearray.cpp b/src/bytearray.cpp | ||
index 0bfbbabff45e..427f3d275bdd 100644 | ||
--- a/src/bytearray.cpp | ||
+++ b/src/bytearray.cpp | ||
@@ -18,7 +18,7 @@ | ||
*/ | ||
#include <string.h> | ||
|
||
-#include <base64/Base64.h> | ||
+#include <base64.h> | ||
|
||
#include <bytearray.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ lib, stdenv, fetchgit, fetchurl | ||
, pugixml, updfparser, curl, openssl, libzip }: | ||
|
||
let | ||
base64 = fetchurl { | ||
url = "https://gist.githubusercontent.com/tomykaira/f0fd86b6c73063283afe550bc5d77594/raw/7d5a89229a525452e37504976a73c35fbaf2fe4d/Base64.h"; | ||
sha256 = "sha256-BKK+6mPEEEd4Y8c6GU2X6UB5fQ+3nPbUbEF8zQ6nGM4="; | ||
}; | ||
in stdenv.mkDerivation rec { | ||
name = "gourou"; | ||
version = "0.7.2"; | ||
|
||
src = fetchgit { | ||
url = "git://soutade.fr/libgourou"; | ||
rev = "v${version}"; | ||
sha256 = "sha256-jvvfrCuRggSPk7p/WtEaKRV7kILuZjUB1KEgaE4LStc="; | ||
}; | ||
|
||
postUnpack = '' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know I said post unpack, but I meant post unpack phase for any phase post unpack, not necessary the Actually this looks more like to be a |
||
cp ${base64} $sourceRoot/include/base64.h | ||
''; | ||
|
||
patches = [ | ||
./base64.patch # vendor base64 header file | ||
./devendor.patch # devendor pugixml and updfparser | ||
]; | ||
|
||
buildInputs = [ pugixml updfparser curl openssl libzip ]; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
install -Dt $out/include include/libgourou*.h | ||
install -Dt $out/lib libgourou.so | ||
install -Dt $out/bin utils/acsmdownloader | ||
install -Dt $out/bin utils/adept_{activate,loan_mgt,remove} | ||
runHook postInstall | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Implementation of Adobe's ADEPT protocol for ePub/PDF DRM"; | ||
homepage = "https://indefero.soutade.fr/p/libgourou"; | ||
license = licenses.lgpl3Plus; | ||
maintainers = with maintainers; [ McSinyx ]; | ||
platforms = platforms.all; | ||
broken = stdenv.isDarwin; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
diff --git a/Makefile b/Makefile | ||
index fac27c2da1db..35439fefd8e1 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -2,10 +2,8 @@ | ||
AR ?= $(CROSS)ar | ||
CXX ?= $(CROSS)g++ | ||
|
||
-UPDFPARSERLIB = ./lib/updfparser/libupdfparser.a | ||
- | ||
-CXXFLAGS=-Wall -fPIC -I./include -I./lib -I./lib/pugixml/src/ -I./lib/updfparser/include | ||
-LDFLAGS = $(UPDFPARSERLIB) | ||
+CXXFLAGS=-Wall -fPIC -I./include | ||
+LDFLAGS = -lpugixml -lupdfparser | ||
|
||
BUILD_STATIC ?= 0 | ||
BUILD_SHARED ?= 1 | ||
@@ -36,10 +34,10 @@ TARGETDIR := bin | ||
SRCEXT := cpp | ||
OBJEXT := o | ||
|
||
-SOURCES = src/libgourou.cpp src/user.cpp src/device.cpp src/fulfillment_item.cpp src/loan_token.cpp src/bytearray.cpp src/pugixml.cpp | ||
+SOURCES = src/libgourou.cpp src/user.cpp src/device.cpp src/fulfillment_item.cpp src/loan_token.cpp src/bytearray.cpp | ||
OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.$(OBJEXT))) | ||
|
||
-all: lib obj $(TARGETS) | ||
+all: obj $(TARGETS) | ||
|
||
lib: | ||
mkdir lib | ||
@@ -56,10 +54,10 @@ $(BUILDDIR)/%.$(OBJEXT): $(SRCDIR)/%.$(SRCEXT) | ||
|
||
libgourou: libgourou.a libgourou.so | ||
|
||
-libgourou.a: $(OBJECTS) $(UPDFPARSERLIB) | ||
- $(AR) crs $@ obj/*.o $(UPDFPARSERLIB) | ||
+libgourou.a: $(OBJECTS) | ||
+ $(AR) crs $@ obj/*.o | ||
|
||
-libgourou.so: $(OBJECTS) $(UPDFPARSERLIB) | ||
+libgourou.so: $(OBJECTS) | ||
$(CXX) obj/*.o $(LDFLAGS) -o $@ -shared | ||
|
||
build_utils: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ lib, stdenv, fetchgit }: | ||
|
||
stdenv.mkDerivation { | ||
name = "updfparser"; | ||
version = "unstable-2022-03-16"; | ||
|
||
src = fetchgit { | ||
url = "git://soutade.fr/updfparser"; | ||
rev = "9d56c1d0b1ce81aae4c8db9d99a8b5d1f7967bcf"; | ||
sha256 = "sha256-9dvibKiUbbI4CrmuAaJzlpntT0XdLvdGeC2/WzjlA5U="; | ||
}; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
install -Dt $out/include include/*.h | ||
install -Dt $out/lib libupdfparser.so | ||
runHook postInstall | ||
''; | ||
|
||
meta = with lib; { | ||
description = "A very simple PDF parser"; | ||
homepage = "https://indefero.soutade.fr/p/updfparser"; | ||
license = licenses.lgpl3Plus; | ||
maintainers = with maintainers; [ McSinyx ]; | ||
platforms = platforms.all; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you just copy the
base64
file in$sourceRoot/include/base64/Base64.h
instead?If this works, this would allow us to drop a patch.