diff --git a/py-mpc-interface/Makefile b/py-mpc-interface/Makefile
index 8504532039fdb1acfcfbb185144d31156122363a..8a916e9c8387d758345327abc902d85b252366e0 100644
--- a/py-mpc-interface/Makefile
+++ b/py-mpc-interface/Makefile
@@ -5,8 +5,10 @@
 ORG=			gepetto
 NAME=			mpc-interface
 VERSION=		1.0.0
+PKGREVISION=		1
 
 USE_PYTHON=		true
+DEPEND_ABI.python=	python>=3.6
 
 CATEGORIES=		wip
 COMMENT=		A fast and flexible formulation of QP Probl
diff --git a/py-mpc-interface/distinfo b/py-mpc-interface/distinfo
index 910125cc7285350dec25a36b21ed2e9b533fbd26..f652d469b9cb0272cc40d20cff4723b064055419 100644
--- a/py-mpc-interface/distinfo
+++ b/py-mpc-interface/distinfo
@@ -1,3 +1,4 @@
 SHA1 (mpc-interface-1.0.0.tar.gz) = 9d872a2ee2b27a769c9809d21542b6682bc9bc55
 RMD160 (mpc-interface-1.0.0.tar.gz) = 060b9eb94cf9e8718b69d2c497708640244d982a
 Size (mpc-interface-1.0.0.tar.gz) = 843336 bytes
+SHA1 (patch-aa) = c94defe7bf6637a6314ea036bd0a44abfc24bca6
diff --git a/py-mpc-interface/patches/patch-aa b/py-mpc-interface/patches/patch-aa
new file mode 100644
index 0000000000000000000000000000000000000000..e5c29074c4280050f1f2ba54eb68f7ab29afcdf8
--- /dev/null
+++ b/py-mpc-interface/patches/patch-aa
@@ -0,0 +1,20 @@
+fix build on Rocky 8
+
+--- cpp/CMakeLists.txt.orig	2022-08-10 22:59:29.000000000 +0200
++++ cpp/CMakeLists.txt	2022-08-11 09:22:29.389031550 +0200
+@@ -8,7 +8,14 @@
+ # Create library
+ add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_HEADERS}
+                                    ${${PROJECT_NAME}_SOURCES})
+-target_link_libraries(${PROJECT_NAME} PUBLIC Eigen3::Eigen)
++modernize_target_link_libraries(
++  ${PROJECT_NAME}
++  SCOPE
++  PUBLIC
++  TARGETS
++  Eigen3::Eigen
++  INCLUDE_DIRS
++  ${EIGEN3_INCLUDE_DIR})
+ target_include_directories(
+   ${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+                          $<INSTALL_INTERFACE:include>)