mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Add patch for python2 build with clang
This commit is contained in:
parent
4644a4c482
commit
a517238f9f
2 changed files with 19 additions and 0 deletions
|
@ -16,6 +16,8 @@ buildPythonPackage rec {
|
|||
sha256 = "64726a4a56783acdc79c6b9b3a15f16e6071077c897a0b999f3b43f744bc621c";
|
||||
};
|
||||
|
||||
patches = stdenv.lib.optional stdenv.cc.isClang ./pyfribidi-clang.patch;
|
||||
|
||||
propagatedBuildInputs = [ six ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
diff --git a/pyfribidi.c b/pyfribidi.c
|
||||
index 9a0120d..238134a 100644
|
||||
--- a/pyfribidi.c
|
||||
+++ b/pyfribidi.c
|
||||
@@ -148,10 +148,11 @@ init_pyfribidi (void)
|
||||
{
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
PyObject *module = PyModule_Create (&pyfribidi_moduledef);
|
||||
+ if (module == NULL) return NULL;
|
||||
#else
|
||||
PyObject *module = Py_InitModule ("_pyfribidi", PyfribidiMethods);
|
||||
+ if (module == NULL) return;
|
||||
#endif
|
||||
- if (module == NULL) return NULL;
|
||||
|
||||
PyModule_AddIntConstant (module, "RTL", (long) FRIBIDI_TYPE_RTL);
|
||||
PyModule_AddIntConstant (module, "LTR", (long) FRIBIDI_TYPE_LTR);
|
Loading…
Reference in a new issue